Data_Structures_Notes
Data_Structures_Notes
Unit 1: Recursion
- Each function call is pushed onto the stack, and upon completion, popped from it.
- A series where each term is the sum of the two preceding terms.
def fibonacci(n):
if n <= 1:
return n
- Problem: Move all disks from Source (A) to Target (C) using Auxiliary (B), maintaining the order of
disks.
- Rules:
Unit 2: Queues
2.1 Introduction
- Queue is a linear data structure that follows the FIFO (First In First Out) principle.
- Circular Queue: Front and rear pointers wrap around when the queue is full.
Unit 3: Trees
- BST: A binary tree where left child < parent < right child.
- Traversals: