Great! Here’s a personalized, step-by-step LeetCode learning plan tailored for your Java background—optimized for Salesforce-style interviews and aimed at building depth one problem at a time.
🚀 6-Week LeetCode Mastery Plan (Java Focus)
Goal: Master 35–40 high-impact LeetCode questions with solid solutions, edge cases, and Java coding patterns.
📅 Week 1 — Arrays & Hashing Fundamentals
| Day |
Problem |
Difficulty |
Notes |
| 1 |
Two Sum |
Easy |
Warm-up, basics of HashMap |
| 2 |
K-diff Pairs in an Array |
Medium |
Asked at Salesforce |
| 3 |
Product of Array Except Self |
Medium |
Tricky, use prefix products |
| 4 |
Subarray Sum Equals K |
Medium |
Prefix sum technique |
| 5 |
Longest Consecutive Sequence |
Medium |
Uses HashSet |
| 6–7 |
Deep dive + review all |
— |
Recode from memory, test edge cases |
📅 Week 2 — Strings & Sliding Window
| Day |
Problem |
Difficulty |
Notes |
| 1 |
Longest Substring Without Repeating Characters |
Medium |
Classic sliding window |
| 2 |
Find All Anagrams in a String |
Medium |
Two pointer logic |
| 3 |
Maximum Number of Occurrences of a Substring |
Medium |
Salesforce favorite |
| 4 |
Palindromic Substrings |
Medium |
Count using expand-around-center |
| 5 |
Longest Palindromic Substring |
Medium |
Dynamic Programming intro |
| 6–7 |
Code review + discuss in mock Q&A format |
— |
Try to optimize further |
📅 Week 3 — LinkedList & Stack
| Day |
Problem |
Difficulty |
Notes |
| 1 |
Reverse Linked List |
Easy |
Recursive + Iterative |
| 2 |
Palindrome Linked List |
Easy/Medium |
Fast/slow pointer technique |
| 3 |
Min Stack |
Easy |
Track min in constant time |
| 4 |
Valid Parentheses |
Easy |
Stack problem |
| 5 |
Daily Temperatures |
Medium |
Monotonic stack |
| 6–7 |
Refactor best practices with Java Collections |
— |
Use Deque, LinkedList, etc. |
📅 Week 4 — Trees & Graphs
| Day |
Problem |
Difficulty |
Notes |
| 1 |
Number of Islands |
Medium |
FAANG + Salesforce classic |
| 2 |
Clone Graph |
Medium |
Use BFS/DFS with HashMap |
| 3 |
Binary Tree Level Order Traversal |
Medium |
BFS with queue |
| 4 |
Lowest Common Ancestor of a Binary Tree |
Medium |
Recursive exploration |
| 5 |
Word Ladder |
Hard |
BFS on word graph |
| 6–7 |
Implement using adjacency lists / Java deque |
— |
Bonus: practice for follow-ups |
📅 Week 5 — Dynamic Programming (DP)
| Day |
Problem |
Difficulty |
Notes |
| 1 |
House Robber |
Medium |
Try bottom-up and memoization |
| 2 |
Longest Increasing Subsequence |
Medium |
Asked at many top firms |
| 3 |
Coin Change |
Medium |
Classic DP bottom-up |
| 4 |
Word Break |
Medium |
Use DP + dictionary |
| 5 |
Edit Distance |
Hard |
Matrix dp with string compare |
| 6–7 |
Revise, solve time+space optimized version |
— |
Present code aloud |
📅 Week 6 — System Design / High-level + Misc.
| Day |
Problem |
Difficulty |
Notes |
| 1 |
LRU Cache |
Medium |
Uses LinkedHashMap or custom DoublyList + HashMap |
| 2 |
LFU Cache |
Hard |
Salesforce favorite |
| 3 |
Insert Delete GetRandom O(1) |
Medium |
HashMap + ArrayList |
| 4 |
Design Twitter |
Medium |
Object-oriented design |
| 5 |
Merge Intervals |
Medium |
Sorting + merging logic |
| 6–7 |
Full mock interview round |
— |
Practice coding + talking through Java APIs |
🔧 Tips for Java Code Success
- Use
List<Integer>, Map<Character, Integer>, and Deque<T> frequently.
- Know when to use
Collections.sort, Arrays.fill, and Java 8 Streams.
-
In interviews, focus on:
- Time and space complexity
- Edge cases (null, empty, duplicates)
- Tradeoffs in implementation (e.g., HashMap over TreeMap)
Let me know if you’d like this plan as a printable PDF or if you’d like daily reminders or Java boilerplate code templates.