Prerequisite: Abstract Data Types or ADT
Why Abstract Data Type became a necessity?
- Earlier if a programmer wanted to read a file, the whole code was written to read the physical file device. So that is how Abstract Data Type (ADT) came into existence.
- The code to read a file was written and placed in a library and made available for everyone’s use. This concept of ADT is being used in the modern languages nowadays.
The code to read the keyboard is an ADT. It has a data structure, a character, and a set of operations that can be used to read that data structure.
- ADT does the work that is necessary implementation and it is not of much concern that how the work is being done. It is like unspecified implementation which can be termed as Abstraction.
- Consider we want maintain a record of quantity of items sold in a sale. At least three possibilities of data structure are there. One can use a linear list or an array or may be a vector to save space and dynamic memory allocation or a linked list so that there is no missing item. A user does not need to know the hidden implementation as long as the data is being entered and obtained correctly.
- For definition refer to Abstract Data Types
Abstract Data Type Model
There is an interface between Application Program and the Abstract Data Type present at the right. ADT consists of the data structures and the functions(private and public) which are interconnected with each other. Since they are entirely present in the ADT so they are out of the scope of the Application Program.
- ADT Data Structure
- All data that is being processed is maintained in a data structure and its implementation must not to be known to the user.
- At the same time all the data about the structure should be present inside the ADT because just encapsulating the data in ADT is not sufficient.
- ADT operations
- Data is inserted, deleted and updated through the application program via the interface. The functions that are publicly declared are directly accessible otherwise not since only the parameter name and number of such parameters is available to the users.
- There is a particular algorithm for every Abstract Data Type for a specific task to be performed.
- Persistent data structures
- Disjoint Set Data Structures
- Gap Buffer Data Structure
- Tango Tree Data Structure
- Advantages of Trie Data Structure
- Design an efficient data structure for given operations
- Data Structure for Dictionary and Spell Checker?
- Burrows - Wheeler Data Transform Algorithm
- Trie Data Structure using smart pointer and OOP in C++
- Ropes Data Structure (Fast String Concatenation)
- Dynamic Disjoint Set Data Structure for large range values
- Design a data structure that supports insert, delete, search and getRandom in constant time
- Overview of Data Structures | Set 3 (Graph, Trie, Segment Tree and Suffix Tree)
- Number of subarrays with GCD = 1 | Segment tree
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.