Jump to content

Difference between ADTs & Data Structures?

Featured Replies

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 :rolleyes:

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.

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.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.