SV
StudyVirus
Get our free app!Download Free

Data Structures

Computers · डेटा संरचनाएं

📋Quick Overview

A data structure is a way of organizing and storing data for efficient access and modification. Common types include Arrays, Linked Lists, Stacks, Queues, Trees, and Graphs. Stack follows LIFO (Last In First Out) and Queue follows FIFO (First In First Out). Data structures are fundamental to computer science and algorithms.

Stack = LIFO (Last In First Out) like a stack of plates; Queue = FIFO (First In First Out) like a line

Array: fixed-size, indexed collection; Linked List: dynamic-size, uses pointers

📖Data Structures

StructureTypeKey Property
ArrayLinearFixed size, indexed, O(1) access
Linked ListLinearDynamic size, pointer-based
StackLinearLIFO — push/pop operations
QueueLinearFIFO — enqueue/dequeue
TreeNon-linearHierarchical — root, branches, leaves
Binary TreeNon-linearMax 2 children per node
GraphNon-linearNodes + edges, network representation
Hash TableNon-linearKey-value pairs, O(1) average lookup

📝Key Points

  • Array: Fixed size, indexed, O(1) access
  • Linked List: Dynamic size, pointer-based
  • Stack: LIFO — push/pop operations
  • Queue: FIFO — enqueue/dequeue
  • Tree: Hierarchical — root, branches, leaves
  • Binary Tree: Max 2 children per node

📝Memory Tricks

📝Exam Corner — Most Asked

📝Quick Revision — One-Liners