Data Structures & Algorithms (DSA)
DSA শেখা প্রোগ্রামিং ক্যারিয়ারের জন্য অত্যন্ত গুরুত্বপূর্ণ। এটি আপনাকে আরও দক্ষ প্রোগ্রামার হতে এবং বড় বড় টেক কোম্পানিতে ইন্টারভিউ ক্র্যাক করতে সাহায্য করবে।
📚 Level 1: Foundation (Beginner)
1. DSA Introduction
- Data Structure কি এবং কেন গুরুত্বপূর্ণ
- Algorithm কি
- Algorithm analysis এর importance
- Problem-solving approach
- Computational thinking
- Real-world applications
- Why DSA matters in interviews
2. Algorithm Analysis Basics
- Time Complexity কি
- Space Complexity কি
- Best case, Average case, Worst case
- Big O Notation introduction
- Why we analyze algorithms
- Performance measurement
- Trade-offs (time vs space)
3. Big O Notation
- O(1) - Constant time
- O(log n) - Logarithmic time
- O(n) - Linear time
- O(n log n) - Linearithmic time
- O(n²) - Quadratic time
- O(n³) - Cubic time
- O(2ⁿ) - Exponential time
- O(n!) - Factorial time
- Comparing complexities
4. Space Complexity
- Memory usage analysis
- Auxiliary space
- Input space
- Stack space in recursion
- In-place algorithms
- Space-time tradeoffs
5. Mathematics for DSA
- Basic arithmetic operations
- Modulo operation
- Power calculation
- GCD (Greatest Common Divisor)
- LCM (Least Common Multiple)
- Prime numbers
- Factorial
- Fibonacci numbers
- Basic number theory
6. Bit Manipulation Basics
- Binary representation
- Decimal to binary conversion
- AND, OR, XOR, NOT operations
- Left shift (<<)
- Right shift (>>)
- Check if number is power of 2
- Count set bits
- Bit manipulation tricks
7. Arrays - Introduction
- Array কি
- Array declaration
- Array initialization
- Accessing elements (indexing)
- Array traversal
- Array length/size
- 1D arrays
- Memory representation
- Advantages এবং Disadvantages
8. Array Operations
- Insertion (beginning, end, position)
- Deletion (beginning, end, position)
- Searching (linear search)
- Updating elements
- Reversing array
- Array rotation
- Time complexity of operations
9. Array Problems - Basic
- Find largest/smallest element
- Find second largest
- Check if array is sorted
- Remove duplicates
- Array sum and average
- Count occurrences
- Find missing number
- Move zeros to end
10. Two Pointer Technique
- Two pointer approach
- Left and right pointers
- Pair sum problems
- Remove duplicates
- Container with most water
- Trapping rainwater (basic)
- Sort colors (Dutch flag)
11. Sliding Window - Basic
- Fixed size window
- Variable size window
- Maximum sum subarray (fixed k)
- First negative in window
- Substring problems (basic)
12. Strings - Basics
- String কি
- String vs Character array
- String declaration
- String length
- String traversal
- String concatenation
- String comparison
- Immutability (language dependent)
13. String Operations
- Character access
- Substring extraction
- String reversal
- Palindrome check
- Character frequency count
- Anagram check
- String searching
- Case conversion
14. Basic Sorting
- Bubble Sort
- Selection Sort
- Insertion Sort
- Time complexity comparison
- Step-by-step implementation
15. Basic Searching
- Linear Search
- Binary Search (basics)
- Time complexity comparison
- Search in sorted array
- Search in rotated array (basic)
- First and last occurrence
📚 Level 2: Intermediate - Core Data Structures
16. Recursion - Fundamentals
- Recursion কি
- Base case এবং Recursive case
- Call stack
- Direct vs Indirect recursion
- Tail recursion
- Stack overflow
- Recursion tree
- When to use recursion
17. Recursion Problems
- Factorial & Fibonacci
- Sum of digits
- Power calculation
- Tower of Hanoi
- Print 1 to N
- Sum of array
- Reverse string
18. Backtracking Introduction
- Backtracking approach
- Decision tree & State space tree
- Pruning
- N-Queens problem (basic)
- Rat in maze
- Subset generation
19. Linked List - Singly
- Linked List কি
- Node structure & Head pointer
- Traversal & Search
- Insertion & Deletion
- Time complexity analysis
20. Linked List - Problems
- Reverse linked list
- Detect cycle (Floyd's algorithm)
- Find middle element
- Remove duplicates
- Merge two sorted lists
- Palindrome check
- Intersection point
- Remove Nth node from end
21. Linked List - Doubly
- Doubly linked list structure
- Forward and backward traversal
- Insertion & Deletion operations
- Advantages over singly
- Disadvantages
- Common problems
22. Linked List - Circular
- Circular linked list basics
- Singly circular vs Doubly circular
- Traversal techniques
- Insertion and deletion
- Use cases (Round Robin, Games)
- Josephus problem
23. Stack - Basics
- Stack কি (LIFO)
- Push, Pop, Peek, isEmpty
- Array & Linked list implementation
- Stack overflow/underflow
- Applications of stack
24. Stack - Problems
- Balanced parentheses
- Next Greater Element
- Stock span problem
- Implement queue using stacks
- Min stack
- Evaluate postfix expression
- Infix to postfix conversion
- Histogram area
25. Queue - Basics
- Queue কি (FIFO)
- Enqueue, Dequeue, Front, Rear
- Circular Array implementation
- Linked list implementation
- Time complexity & Applications
26. Queue - Problems
- Implement stack using queues
- First non-repeating character
- Generate binary numbers
- Level order traversal (intro)
- Sliding window maximum
- Circular tour
27. Deque (Double-ended Queue)
- Deque operations
- Input/Output restricted deque
- Implementation (Array/DLL)
- Applications & Problems
28. Priority Queue
- Priority Queue কি
- Max heap vs Min heap concept
- Operations (Insert, Extract)
- Implementation (Binary Heap)
- Applications (Dijkstra, Huffman)
- Time complexity
29. Hashing - Introduction
- Hashing কি
- Hash function & Hash table
- Direct addressing
- Collision handling intro
- Load factor & Applications
30. Hash Map / Hash Table
- HashMap operations
- Collision resolution (Chaining, Probing)
- Open addressing (Linear, Quadratic, Double)
- Rehashing
- Time complexity
31. Hash Set
- Set operations (Add, Remove, Contains)
- Unique elements property
- Implementation using HashMap
- Union, Intersection, Difference
- Common problems
32. Hashing - Problems
- Two sum problem
- Subarray with sum 0
- Longest subarray with sum k
- Count distinct elements
- Frequency counting
- First repeating element
- Group anagrams
- Longest consecutive sequence
33. Matrix/2D Arrays
- 2D array representation
- Row-major vs Column-major
- Matrix traversal
- Spiral traversal
- Diagonal traversal
- Matrix rotation
- Matrix search (sorted)
- Set matrix zeros
35. String Pattern Matching
- Naive pattern matching
- KMP Algorithm basics
- Rabin-Karp Algorithm
- Pattern search problems
- Anagram search
- String matching applications
36. String Advanced Problems
- Longest common prefix
- Longest palindromic substring
- Valid parentheses variations
- Word break problem
- Minimum window substring
- Longest substring without repeating
- String compression
- Wildcard matching (intro)
37. Prefix Sum Technique
- Prefix sum array
- Range sum queries
- Equilibrium index
- Subarray sum problems
- 2D prefix sum
- Applications
38. Kadane's Algorithm
- Maximum subarray sum
- Algorithm explanation
- Variations (circular array)
- Maximum product subarray
- Applications
📚 Level 3: Advanced - Trees & Graphs
39. Tree Basics
- Tree terminology (root, leaf, parent, child, sibling)
- Tree properties (height, depth, level)
- Types of trees
- Binary tree vs General tree
- Tree applications
- Tree representation
40. Binary Tree - Basics
- Binary tree structure
- Node structure
- Binary tree properties
- Full binary tree
- Complete binary tree
- Perfect binary tree
- Balanced binary tree
- Skewed binary tree
41. Binary Tree - Traversals
- Inorder traversal (Left-Root-Right)
- Preorder traversal (Root-Left-Right)
- Postorder traversal (Left-Right-Root)
- Level order traversal (BFS)
- Recursive vs Iterative
- Morris traversal (advanced)
42. Binary Tree - Problems
- Height of tree
- Count nodes
- Count leaf nodes
- Check if balanced
- Diameter of tree
- Mirror tree
- Check if identical
- Lowest common ancestor (LCA)
- Print all paths from root to leaf
43. Binary Search Tree (BST)
- BST property
- BST operations (insert, delete, search)
- Inorder gives sorted output
- Find min/max
- Floor and ceil
- Kth smallest/largest
- Check if BST
- Time complexity: O(h)
45. AVL Tree
- Self-balancing BST
- Balance factor
- Rotations (LL, RR, LR, RL)
- Insertion with balancing
- Deletion with balancing
- Height: O(log n)
- Applications
46. Heap Data Structure
- Min heap এবং Max heap
- Heap property
- Array representation
- Parent-child relationship
- Heapify operation
- Build heap
- Time complexity
47. Heap Operations & Problems
- Insert element
- Delete element (extract max/min)
- Heap sort
- Kth largest/smallest element
- Merge K sorted arrays
- Median from data stream
- Top K frequent elements
- Priority queue implementation
TIP
DSA শিখার সময় তাড়াহুড়ো করবেন না। প্রতিটি কনসেপ্ট ভালোমতো বুঝে তারপর সামনের দিকে আগাবেন।