0% found this document useful (0 votes)
3 views8 pages

DSA in Java

The document outlines a comprehensive 1-month plan for learning Data Structures and Algorithms (DSA) in Java, divided into four weeks focusing on different topics such as arrays, strings, linked lists, trees, and graphs. Each week includes daily lessons, practice problems, and weekly reviews to reinforce learning. The plan culminates in a final revision day to address weak areas and prepare for mock interviews.

Uploaded by

Kusam Thakur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
3 views8 pages

DSA in Java

The document outlines a comprehensive 1-month plan for learning Data Structures and Algorithms (DSA) in Java, divided into four weeks focusing on different topics such as arrays, strings, linked lists, trees, and graphs. Each week includes daily lessons, practice problems, and weekly reviews to reinforce learning. The plan culminates in a final revision day to address weak areas and prepare for mock interviews.

Uploaded by

Kusam Thakur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 8

DSA in Java - 1-Month Plan (Detailed)

Week 1: Basics, Arrays, and Sorting


Day 1:
• Java Basics:
o Input/Output: Scanner class, System.out.print().
o Loops: for, while, do-while.
o Conditionals: if-else, switch.
o Functions: Defining, Calling, Parameters, Return Values.
• Arrays Basics:
o Traversal: Iterating through elements.
o Searching: Linear Search.
o Updating: Modify elements at specific indexes.
• Practice Problems:
o Reverse an Array.
o Find Maximum and Minimum in Array.

Day 2:
• Advanced Arrays:
o Prefix Sum: Cumulative sum of elements for quick range queries.
o Kadane’s Algorithm: Maximum subarray sum problem.
• Practice Problems:
o Subarray Sum Equals K.
o Rotate Array.

Day 3:
• Sorting Algorithms:
o Bubble Sort: Repeated swapping of adjacent elements.
o Selection Sort: Selecting the smallest element in each pass.
o Insertion Sort: Build the sorted array one element at a time.
• Practice Problems:
o Sort an Array.
o Find Kth Smallest/Largest Element.

Day 4:
• Searching Algorithms:
o Linear Search: Traverse each element.
o Binary Search: Divide and conquer approach for sorted arrays.
• Practice Problems:
o Search in Rotated Sorted Array.
o Floor and Ceiling in Sorted Array.

Day 5:
• Two-Pointer Approach:
o Pair Sum.
o Triplet Sum.
• Sliding Window Technique:
o Maximum Sum Subarray of Size K.
• Practice Problem:
o Longest Substring Without Repeating Characters.

Day 6:
• Practice: Arrays and Sorting Problems on LeetCode or GeeksforGeeks.

Day 7:
• Weekly Review:
o Revise Arrays, Sorting, and Searching Topics.
o Solve Mixed Problems from Arrays.
Week 2: Strings, Recursion, and Hashing
Day 8:
• Strings Basics:
o Manipulation using StringBuilder.
o Palindrome Check.
o Generate Substrings.
• Practice Problems:
o Check Anagram.
o Reverse Words in String.

Day 9:
• Advanced Strings:
o Longest Palindromic Substring.
o String Compression.
• Practice Problems:
o Longest Common Prefix.
o Count and Say Sequence.

Day 10:
• Recursion Basics:
o Factorial.
o Fibonacci Sequence.
o Sum of Digits.
• Practice Problems:
o Print Subsequences.
o Tower of Hanoi.

Day 11:
• Backtracking:
o N-Queens Problem.
o Sudoku Solver.

Day 12:
• Hashing Basics:
o Using HashMap and HashSet in Java.
• Practice Problems:
o Frequency Count.
o Intersection of Two Arrays.

Day 13:
• Advanced Hashing:
o Two Sum Problem.
o Subarray with Given Sum.
• Practice Problems:
o Longest Subarray with 0 Sum.
o Count Distinct Elements.

Day 14:
• Weekly Review:
o Practice Strings, Recursion, and Hashing Problems.

Week 3: Linked Lists, Stacks, and Queues


Day 15:
• Singly Linked List:
o Insertion.
o Deletion.
o Reversal.
• Practice Problems:
o Detect Cycle in Linked List.
o Remove Nth Node from End.

Day 16:
• Doubly and Circular Linked Lists:
o Operations: Insertion, Deletion, Traversal.
o Practice Basic Problems.

Day 17:
• Stacks Basics:
o Implement Stacks Using Arrays and Linked Lists.
• Practice Problems:
o Valid Parentheses.
o Next Greater Element.

Day 18:
• Queues Basics:
o Implementation Using Arrays and Linked Lists.
• Practice Problems:
o Circular Queue.
o First Non-Repeating Character.

Day 19:
• Advanced Stack and Queue Problems:
o Sliding Window Maximum.
o Evaluate Postfix Expression.

Day 20:
• Practice: Linked Lists, Stacks, and Queues Problems.
Day 21:
• Weekly Review:
o Revise and Solve Mixed Problems from Linked Lists, Stacks, and Queues.

Week 4: Trees, Graphs, and Advanced Topics


Day 22:
• Binary Trees:
o Traversals: Inorder, Preorder, Postorder.
• Practice Problems:
o Height of a Tree.
o Diameter of a Tree.

Day 23:
• Binary Search Tree (BST):
o Insertion.
o Deletion.
o Search.
• Practice Problems:
o Validate BST.
o Convert Sorted Array to BST.

Day 24:
• Graphs Basics:
o Representation: Adjacency List, Adjacency Matrix.
• Practice Problems:
o BFS.
o DFS.
o Number of Islands.
Day 25:
• Advanced Graphs:
o Topological Sorting.
o Cycle Detection.
• Practice Problems:
o Shortest Path in Weighted Graph.

Day 26:
• Heaps:
o Min-Heap and Max-Heap.
o Priority Queue in Java.
• Practice Problems:
o Kth Largest Element.
o Merge K Sorted Arrays.

Day 27:
• Dynamic Programming Basics:
o Fibonacci (DP Approach).
o Knapsack Problem.
o Longest Common Subsequence.

Day 28:
• Advanced DP Problems:
o Longest Increasing Subsequence.
o Edit Distance.

Day 29:
• Practice Mixed DSA Problems:
o Arrays, Linked Lists, Trees, Graphs, and DP.

Day 30:
• Final Revision:
o Focus on Weak Areas.
o Solve Mock Interview Problems.

You might also like