3-Month Data Structures & Algorithms Study Plan (C++)
3-Month Data Structures & Algorithms Study Plan (C++)
Theory Focus:
LeetCode Problems:
SPOJ Problems:
Theory Focus:
● String manipulation
● KMP algorithm basics
● Hashing for strings
LeetCode Problems:
CodeChef Problems:
● LAPIN - Lapindromes
● CHEFSQ - Chef and Subsequences
SPOJ Problems:
● RPLC - Replace
● ANARC05B - The Double HeLiX
Week 3: Recursion & Backtracking
Theory Focus:
● Recursion fundamentals
● Backtracking technique
● Divide and conquer approach
LeetCode Problems:
CodeChef Problems:
● NOKIA - Nokia
● MARCHA1 - Marcha1
SPOJ Problems:
Theory Focus:
LeetCode Problems:
● Binary Search - Easy
● First Bad Version - Easy
● Search Insert Position - Easy
● Find First and Last Position of Element in Sorted Array - Medium
● Search in Rotated Sorted Array - Medium
● Merge Intervals - Medium
● Kth Largest Element in an Array - Medium
● Insert Interval
● Meeting Rooms II
● Non-overlapping Intervals
● Task Scheduler
● Merge Sorted Array
● Sort Colors
● First Missing Positive
● Kth Largest Element in an Array
● Sort List
Searching :
CodeChef Problems:
SPOJ Problems:
LeetCode Problems:
CodeChef Problems:
SPOJ Problems:
Theory Focus:
LeetCode Problems:
CodeChef Problems:
SPOJ Problems:
Theory Focus:
LeetCode Problems:
CodeChef Problems:
● PT07Y - Is it a tree
● BTCODE - Binary Tree Codes
Sedgewick Chapters: Chapter 2.4 (Priority Queues), Chapter 3.4 (Hash Tables)
Theory Focus:
LeetCode Problems:
CodeChef Problems:
SPOJ Problems:
Theory Focus:
● Graph representations
● BFS and DFS traversals
● Connected components
● Topological sorting
LeetCode Problems:
CodeChef Problems:
SPOJ Problems:
Theory Focus:
● Dijkstra's algorithm
● Bellman-Ford algorithm
● Floyd-Warshall algorithm
● MST (Kruskal's and Prim's)
LeetCode Problems:
CodeChef Problems:
● DISJOINT - Disjoint Set Union
SPOJ Problems:
Theory Focus:
● Memoization vs tabulation
● 1D and 2D DP problems
● Classic DP patterns
LeetCode Problems:
CodeChef Problems:
● MIXTURES - Mixtures
● COINS - Bytelandian gold coins
● PARTY - Party Schedule
SPOJ Problems:
● ACODE - Alphacode
● COINS - Bytelandian gold coins
● LIS - Longest Increasing Subsequence
Theory Focus:
● Advanced DP patterns
● State machine DP
● Bitmask DP basics
● Review weak areas
LeetCode Problems:
● Best Time to Buy and Sell Stock with Transaction Fee - Medium
● Palindromic Substrings - Medium
● Longest Palindromic Subsequence - Medium
● Minimum Path Sum - Medium
● Target Sum - Medium
CodeChef Problems:
SPOJ Problems:
Practice:
● Advanced Graph Algorithms:
● Problems to solve: 15
● Dijkstra's Algorithm
● Bellman-Ford Algorithm
● Floyd-Warshall Algorithm
● Minimum Spanning Tree
● Topological Sorting
● Miscellaneous Topics:
● Problems to solve: 15
● Bit Manipulation
● Tries
● Segment Trees
● Fenwick Trees
● Suffix Arrays
Additional Resources
● CP-Algorithms for advanced topics not covered in Sedgewick
● GeeksforGeeks for implementation references
● Codeforces for additional contest practice
● InterviewBit for structured interview preparation
Success Metrics
● Solve 80% of Easy problems within 15 minutes
● Solve 60% of Medium problems within 30 minutes
● Solve 30% of Hard problems within 45 minutes
● Consistent participation in weekly contests
● Improvement in contest rankings over time
Theory:
● Read Chapters 1-3 from "Algorithms in C++" by Robert Sedgewick to get an
introduction to algorithms, union-find, and analysis of algorithms.
Practice:
● Arrays and Strings:
● Problems to solve: 10
● Two Sum
● Best Time to Buy and Sell Stock II
● Move Zeroes
● Reverse String
● Valid Palindrome
● Linked Lists:
● Problems to solve: 10
● Reverse Linked List
● Merge Two Sorted Lists
● Linked List Cycle
● Remove Nth Node From End of List
● Palindrome Linked List
Practice:
● Stacks and Queues:
● Problems to solve: 10
● Valid Parentheses
● Min Stack
● Implement Queue using Stacks
● Evaluate Reverse Polish Notation
● Daily Temperatures
● Sorting Algorithms:
● Problems to solve: 10
● Merge Sorted Array
● Sort Colors
● First Missing Positive
● Kth Largest Element in an Array
● Sort List
Theory:
● Read Chapters 6-7 from "Algorithms in C++" by Robert Sedgewick to understand
trees and graphs.
Practice:
● Trees:
● Problems to solve: 15
● Invert Binary Tree
● Maximum Depth of Binary Tree
● Validate Binary Search Tree
● Binary Tree Level Order Traversal
● Lowest Common Ancestor of a Binary Tree
● Graphs:
● Problems to solve: 15
● Number of Islands
● Clone Graph
● Course Schedule
● Word Ladder
● Graph Valid Tree
Theory:
● Read Chapters 8-9 from "Algorithms in C++" by Robert Sedgewick to understand
advanced sorting and searching algorithms.
Practice:
● Advanced Sorting:
● Problems to solve: 10
● Merge Intervals
● Insert Interval
● Meeting Rooms II
● Non-overlapping Intervals
● Task Scheduler
● Searching:
● Problems to solve: 10
● Search in Rotated Sorted Array
● Find Peak Element
● Search a 2D Matrix
● Find Minimum in Rotated Sorted Array
● Median of Two Sorted Arrays
Theory:
● Read Chapter 10 from "Algorithms in C++" by Robert Sedgewick to understand
dynamic programming.
Practice:
● Dynamic Programming:
● Problems to solve: 20
● Climbing Stairs
● House Robber
● Coin Change
● Longest Increasing Subsequence
● Word Break
● Knapsack Problem
● Matrix Chain Multiplication
● Edit Distance
● Maximum Product Subarray
● Unique Paths
Theory:
● Read Chapters 11-12 from "Algorithms in C++" by Robert Sedgewick to
understand advanced graph algorithms.
Practice:
● Advanced Graph Algorithms:
● Problems to solve: 15
● Dijkstra's Algorithm
● Bellman-Ford Algorithm
● Floyd-Warshall Algorithm
● Minimum Spanning Tree
● Topological Sorting
● Miscellaneous Topics:
● Problems to solve: 15
● Bit Manipulation
● Tries
● Segment Trees
● Fenwick Trees
● Suffix Arrays
Additional Resources
This plan should give you a structured approach to mastering Data Structures and
Algorithms in C++ with a strong focus on problem-solving. Good luck!