So, lets erase the confusion of what, which, when the data structure to be used through this article.
As part of academic we are well known that, data structures are classified into Linear and Non-Linear Data Structures.
Linear are the Data Structures like Array, Sorted Array, Stack, Queue, Linked List.
Non-Linear are the Data Structures Like Binary Tree, Red-Black Tree, 2-3-4 Tree, Graph, Hash Table, Heap
Array:
Advantages:
1. Quick Insertion
2. Quick Access of any element in the array
Disadvantages:
1. Slow Deletion
2. Slow Search
Sorted Array:
Advantages:
1. Quick Search
2. Quick Access of any element
Disadvantages:
1. Slow Deletion, Insertion
Stack:
Advantages:
1. Last In First Out access
Disadvantages:
1. Slow Access, Search for remaining elements
Queue:
Advantages:
1. First In First Out Access
Disadvantages:
1. Slow Access, Search for other elements
Linked List:
Advantages:
1. Quick Insertion, Deletion
Disadvantages:
1. Slow Search
Binary Tree:
Advantages:
1. Quick Search, Insertion, Deletion ( If the Tree is BALANCED )
Disadvantages:
1. Deletion Algorithm is complex
Red-Black Tree:
Advantages:
1. Quick Search, Insertion, Deletion ( Tree is ALWAYS BALANCED )
Disadvantages:
1. Complex
2-3-4 Tree:
Advantages:
1. Quick Search, Insertion, Deletion ( Tree is ALWAYS BALANCED )
2. Good for Disk Storage
Disadvantages:
1. Complex
Hash Table:
Advantages:
1. Fast Access if the key is known
2. Fast Insertion
Disadvantages:
1. Slow Access, Insertion
Heap:
Advantages:
1. Fast Insertion, Deletion
2. Fast Access to the largest item
Disadvantages:
1. Slow Access to the remaining items
As part of academic we are well known that, data structures are classified into Linear and Non-Linear Data Structures.
Linear are the Data Structures like Array, Sorted Array, Stack, Queue, Linked List.
Non-Linear are the Data Structures Like Binary Tree, Red-Black Tree, 2-3-4 Tree, Graph, Hash Table, Heap
Array:
Advantages:
1. Quick Insertion
2. Quick Access of any element in the array
Disadvantages:
1. Slow Deletion
2. Slow Search
Sorted Array:
Advantages:
1. Quick Search
2. Quick Access of any element
Disadvantages:
1. Slow Deletion, Insertion
Stack:
Advantages:
1. Last In First Out access
Disadvantages:
1. Slow Access, Search for remaining elements
Queue:
Advantages:
1. First In First Out Access
Disadvantages:
1. Slow Access, Search for other elements
Linked List:
Advantages:
1. Quick Insertion, Deletion
Disadvantages:
1. Slow Search
Binary Tree:
Advantages:
1. Quick Search, Insertion, Deletion ( If the Tree is BALANCED )
Disadvantages:
1. Deletion Algorithm is complex
Red-Black Tree:
Advantages:
1. Quick Search, Insertion, Deletion ( Tree is ALWAYS BALANCED )
Disadvantages:
1. Complex
2-3-4 Tree:
Advantages:
1. Quick Search, Insertion, Deletion ( Tree is ALWAYS BALANCED )
2. Good for Disk Storage
Disadvantages:
1. Complex
Hash Table:
Advantages:
1. Fast Access if the key is known
2. Fast Insertion
Disadvantages:
1. Slow Access, Insertion
Heap:
Advantages:
1. Fast Insertion, Deletion
2. Fast Access to the largest item
Disadvantages:
1. Slow Access to the remaining items
Comments
Post a Comment