Theresonly1 Posted September 4, 2008 Posted September 4, 2008 Hi There... Simply i want to know what is the difference between ADT(Abstract Data types) & Data Structures? With all those years i still get confused between the 2 and cannot distinguish between the 2. I have a list of Computer Science/ Programming terminologies stuff... Can someone help me seperate them? List ArrayList LinkedList Map HashMap TreeMap Set HashSet TreeSet Tree BinaryTree Stack Queue Graphs Tables Arrays and did i miss any
D H Posted September 4, 2008 Posted September 4, 2008 An data structure is just that: A bunch of data grouped together for some reason. All one can do with a data structure is access/modify the data within the structure. An abstract data type is a collection of data plus the operations that can be performed on the data. In the extreme, the data that comprise the ADT are not directly accessible from the outside. When implemented in this manner, the only way to get at the data (or modify it) is through the defined operations on the ADT. An IEEE double precision floating point numbers (e.g., the type doubles in C/C++) is an ADT. Most people don't care that such numbers comprise a sign bit, an 11 bit base 2 exponent, and a 52-bit mantissa. Most people don't care that the exponent is expressed in excess-1023 notation, that an exponent of zero has very special meaning, that the binary point is right before the first bit in the mantissa, or that there is an implied one to the left of the binary point except when there isn't. All most people care about is that the operators +, -, *, /, and = work on these numbers.
bascule Posted September 4, 2008 Posted September 4, 2008 I see data structures as being implementations of a specific type of algorithm, and abstract data types having a specific set of properties which can be implemented in any number of ways. For example, dictionaries are simple key/value stores, but can be backed by any number of implementations, for example: binary trees, hash tables, b-trees, skip lists. Which one you choose depends on what kind of data you're storing and how you're storing it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now