📅 2-Month DSA Plan (Arrays & Strings Focus)
Week 1: Basic Array Manipulation (8 Questions) 🔹 Goal – Build a strong foundation with basic array operations.
Day 1-2: Find the largest and smallest element in an array. Reverse an array. Day 3-4: 3. Rotate an array (left/right) by k steps. 4. Move all zeros to the end. Day 5-6: 5. Remove duplicates from a sorted array. 6. Find the second largest element. Day 7: Revision – Solve 3-4 questions again from memory.
Week 2: Searching & Sorting (8 Questions) 🔹 Goal – Master array search and sorting techniques.
Day 1-2: Binary Search (Iterative/Recursive). Find the first and last occurrence of an element. Day 3-4: 3. Find the missing number in an array (1 to N). 4. Find the majority element (appears more than n/2 times). Day 5-6: 5. Kth smallest/largest element. 6. Sort an array of 0s, 1s, and 2s (Dutch National Flag). Day 7: Revision – Solve 3-4 questions from this week again.
Week 3: Subarray Problems (4 Questions) 🔹 Goal – Focus on subarray problems and Kadane’s Algorithm.
Day 1-2: Find the subarray with the maximum sum (Kadane’s Algorithm). Longest subarray with a given sum. Day 3-4: 3. Count the number of subarrays with sum equal to k. 4. Find all subarrays with 0 sum. Day 5-6: Solve the above problems again using sliding window or hashing approaches. Day 7: Mock Test – Solve all 4 problems in one sitting.
Week 4: Basic String Operations (6 Questions) 🔹 Goal – Build confidence in string manipulation techniques.
Day 1-2: Reverse a string. Check if a string is a palindrome. Day 3-4: 3. Count vowels and consonants. 4. Remove duplicates from a string. Day 5-6: 5. Find the first non-repeating character. 6. Check if two strings are anagrams. Day 7: Revision – Solve 3-4 questions from this week again.
Week 5: Sliding Window Problems (6 Questions) 🔹 Goal – Practice subarray and substring problems with sliding window.
Day 1-2: Maximum sum of subarray of size k. Longest substring without repeating characters. Day 3-4: 3. Longest subarray with sum k (positive integers). 4. Smallest subarray with sum ≥ k. Day 5-6: 5. Longest repeating character replacement. 6. Count anagrams of a pattern in a string. Day 7: Mock Test – Solve all 6 problems under time constraints.
Week 6: Hashing Problems (7 Questions) 🔹 Goal – Solve array and string problems efficiently using hashing.
Day 1-2: Two Sum (Find pair with given sum). Longest subarray with sum k (including negatives). Day 3-4: 3. Subarray with 0 sum. 4. Count distinct elements in every window of size k. Day 5-6: 5. First non-repeating character in a string. 6. Check for anagram (Hashmap frequency counting). 7. Longest consecutive sequence (array). Day 7: Mock Test – Solve 3 problems from memory.
Week 7: Two Pointer Problems (7 Questions) 🔹 Goal – Optimize array and string problems using two pointers.
Day 1-2: Pair sum in a sorted array. Three sum problem. Day 3-4: 3. Container with most water. 4. Remove duplicates from sorted array. Day 5-6: 5. Sort array of 0s, 1s, and 2s. 6. Check if a string is palindrome (using two pointers). 7. Merge two sorted arrays (without extra space). Day 7: Mock Test – Solve 3-4 questions under time constraints.
Week 8: Final Revision & Mock Interviews 🔹 Goal – Revise all 45 questions and simulate interview settings.
Day 1-3: Solve 5-6 random questions from the entire list daily. Day 4-5: Focus on sliding window, hashing, and two-pointer problems. Day 6: Solve mock tests on platforms like LeetCode. Day 7: Full revision – Quick solve all problems that felt difficult.
🔸 Key Tips: Track Time – Solve problems within 30-45 mins. Daily Practice – Minimum 1-2 hours daily. Focus on Explanation – Be ready to explain your thought process during interviews.
Let me know if you want help with code for any of these problem