




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





A data structure is a way to organize and store data so it can be used efficiently. Whether you're building a calculator, a search engine, or a game—data structures are the backbone of your logic. 🗒 Sticky Note : Data structures = smart containers. They decide how fast and clean your code runs.
They’re formats used to store and organize data. The goal is to make operations like searching, inserting, deleting, and updating fast and efficient. 🗒 Real-Life Analogy: Think of a stack as a pile of plates, a queue as a line at a shop, and a tree as a family chart.
Category Examples Linear Arrays, Linked Lists, Stacks, Queues Non-Linear Trees, Graphs Hash-based Hash Tables File-based Databases, File Systems
Structure Principle Use Case Stack LIFO (Last In First Out) Undo, recursion Queue FIFO (First In First Out) Scheduling, buffering
Hierarchical structure Binary Tree, BST, AVL, Heap Used in databases, file systems, decision trees
Inorder Preorder postorder
Nodes connected by edges Types: Directed, Undirected, Weighted Used in maps, networks, social media
BFS (Breadth-First Search) DFS (Depth-First Search) Dijkstra’s (Shortest Path)
Key-value storage Fast lookup Used in dictionaries, caches
🗒 Sticky Note : Time = speed. Space = memory. Balance both for smart code.
Data structures = organized data Arrays, Linked Lists, Trees, Graphs = core types Stacks and Queues = control flow Hash Tables = fast access Sorting and Searching = optimize performance Time/Space Complexity = measure efficiency 🗒 Sticky Note Recap : Array = shelf Linked List = chain Stack = plate pile
Queue = waiting line Tree = hierarchy Graph = network Hash Table = fast lookup