Fundamental Data Structures
Fundamental Data Structures
Fundamental Data Structures
Structures
Nabila Rafique
MS220400029
Operations
Working of Stack
Operations
Working of Queue
Usage
• Perform arithmetic operation.
Traversal: Access each element of link list.
• Perform polynomial manipulation
Search: Find a node in link list.
Sort: Sort the nodes of link list.
Link List
Linear Data Structure
A Self Balancing m-way tree, maintain sorted data with more than two Childrens and multiple keys at every node.
B-Tree
Properties: M=5
1. Every node has at most m children.
2. Every non-leaf has at least two children.
3. Every internal node has at least ⌈m/2⌉ children.
4. All leaves appear at same level.
5. A non-leaf node with k children contain k-1 keys.
B-Tree
Non-Linear Data Structure
Operations
Remember
Insert: Adds an element to B-tree in ascending order and
restructure the tree if needed. After Operation the B-Tree
Delete: Removes an element from B-Tree, rearrange elements in should have its all properties
ascending order and restructure tree. satisfied
Search: Search an element from B-Tree.
Types of B-Tree
B*
Balances more neighboring internal nodes to keep them more densely packed.
B* This variant ensures non-root nodes are at least 2/3 full instead of 1/2.
Created to postpone splitting operation as long as they can
B-Tree
Non-Linear Data Structure
Working of B-Tree
Operations PUSH, POP, TOP, Enqueue, Dequeue, Insertion, Deletion, Insert, Delete,
SIZE, IS Empty, Is Full Peek, Is Empty, Is Full Traversal, Search, Sort Search