- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
ADT-array Representation in Data Structure
Basic concept
ADT indicates for Abstract Data Type.
Arrays are defined as ADT’s because they are capable of holding contiguous elements in the same order. And they permit
access for the specific element via index or position.
They are abstract because they can be String, int or Person
int[] arrA = new int[1]; String[] arrB = new String[1]; Person[] arrC = new Person[3]; // where Person is treated as a defined class
Advantages
- Fast, random access of items or elements.
- Very memory efficient, very little memory is needed other than that needed to store the contents.
Disadvantages
- Slow insertion and deletion of elements
- Array size must be known when the array is created and is fixed (static)
An Array-Based Implementation of the ADT List
Public class ListArrayBased implementsListInterface { private static final int MAX_LIST1 = 50; private Object items1[]; // an array of list items privateint numItems1; // number of items in list publicListArrayBased() { items1 = new Object[MAX_LIST1]; numItems1 = 0; } // end default constructor }
- Related Articles
- Binary Tree ADT in Data Structure
- Array of Arrays Representation in Data Structure
- Weighted Graph Representation in Data Structure
- Stack ADT in Data Structures
- Array Doubling in Data Structure
- What is an array data structure in Java?
- Multiple Lists in a Single Array in Data Structure
- Rectangle Data in Data Structure
- Binary Tree Representation in Data Structures
- Deaps in Data Structure
- Quadtrees in Data Structure
- Halfedge data structure
- Boole’s Inequality in Data Structure
- Bayes’ Rule in Data Structure
- Dictionary Operations in Data Structure

Advertisements