Data & File Structure – Easy Short Notes
UNIT–1 : Introduction to Data Structure
• Data Structure: Method of organizing data efficiently.
• Types: Linear and Non-Linear.
• Operations: Traversing, Insertion, Deletion, Searching, Sorting, Merging.
• Time Complexity: Time taken by algorithm.
• Space Complexity: Memory used by algorithm.
• Big O Notation: Represents efficiency like O(1), O(n), O(n²).
• Array: Collection of same type data stored in contiguous memory.
• Stack: Follows LIFO principle. Operations: Push, Pop.
• Queue: Follows FIFO principle. Operations: Enqueue, Dequeue.
• Recursion: Function calling itself repeatedly.
UNIT–2 : Pointers & Linked List
• Pointers: Variable storing address of another variable.
• Dynamic Memory Allocation: Memory allocated at runtime.
• Self Referential Structure: Structure containing pointer to same structure type.
• Linked List: Collection of nodes connected by pointers.
• Types: Singly, Doubly, Circular Linked List.
• Applications: Memory management, Stack and Queue implementation.
UNIT–3 : Trees
• Tree: Non-linear hierarchical data structure.
• Binary Tree: Each node has maximum two children.
• Traversals:
- Inorder
- Preorder
- Postorder
• Binary Search Tree: Left node smaller, right node greater.
• Complete Tree: All levels filled except maybe last.
• Heap: Max Heap and Min Heap.
UNIT–4 : Sorting & Searching
• Internal Sorting: Sorting in main memory.
• External Sorting: Sorting using external storage.
• Bubble Sort: Swaps adjacent elements repeatedly.
• Insertion Sort: Inserts elements at correct position.
• Selection Sort: Selects smallest element repeatedly.
• Quick Sort: Uses pivot element.
• Linear Search: Checks one by one.
• Binary Search: Uses middle element in sorted array.
UNIT–5 : File Structure
• File Structure: Method of storing data in files.
• Field: Single data item.
• Record: Collection of fields.
• File: Collection of records.
• File Organization: Sequential, Direct, Indexed Sequential.
• Text Files: Stores data in character form.
• Hashing: Fast searching using hash function.
MOST IMPORTANT TOPICS FOR EXAM
UNIT–1: Arrays, Stack, Queue, Big O Notation, Recursion
UNIT–2: Pointers, Linked List, Dynamic Memory Allocation
UNIT–3: Binary Tree Traversal, BST, Heap
UNIT–4: Bubble Sort, Quick Sort, Binary Search
UNIT–5: File Organization, Hashing