Swapna Kumar Panda
Swapna Kumar Panda

@swapnakpanda

14 Tweets 6 reads Oct 26, 2022
Learning Data Structures? You can master it in just 6 simple steps.
Learning a new Data Structure?
⬘ First, check its behavior for the below attributes
➊ Linearity
➋ Memory Allocation
➌ Connectivity
➍ Ordering
➎ Uniqueness
⬙ Then, implement their
➏ Common Operations
➊ Linearity
➤ Linear
➤ Non-linear
✧ It says about the traversal path.
➋ Memory Allocation
➤ Contiguous
➤ Non-contiguous
✧ It says about how elements are stored in physical memory.
➌ Connectivity
➤ One-Directional
➤ Bi-Directional
✧ It says about how 2 elements are connected to each other.
➍ Ordering
➤ Ordered
➤ Unordered
✧ It says if the fetching of elements is always predictive or randomized.
➎ Uniqueness
➤ Only Unique Elements
➤ Duplicates are allowed
✧ It says if the insertion of an element is restricted when a similar element already exists.
➏ Common Operations
➤ Traversal
➤ Insertion
➤ Deletion
➤ Get
✧ These are the common operations performed on all data structures.
Example ➊ : Array
❯ Linear
❯ Contiguous
❯ One-Directional
❯ Ordered
❯ Duplicates are allowed
Example ➋ : Set
In case of Array based implementation,
❯ Linear
❯ Contiguous
❯ One-Directional
❯ Ordered
❯ Only Unique Elements
Example ➌ : Hash Table
❯ Linear
❯ Non-Contiguous
❯ One-Directional
❯ Unordered
❯ Only Unique Keys
Example ➍ : Doubly Linked List
❯ Linear
❯ Non-Contiguous
❯ Bi-Directional
❯ Ordered
❯ Duplicates are allowed
Example ➎ : Tree
❯ Non-Linear
❯ Non-Contiguous
❯ Mostly One-Directional
❯ Ordered
❯ Duplicates are allowed
Hey 👋
I am a Tech Writer, Educator, and Mentor from India 🇮🇳, here sharing
✰ Tutorials
✰ Tricks
✰ Career Tips
✰ Cheat Sheets
✰ Practice Questions
✰ Roadmaps
on
➠ Web Development
➠ Data Structures and Algorithms
➠ Databases
Thanks for reading. 🙏

Loading suggestions...