Explore tweets tagged as #HardLeetCodeInJava
Day 2 of solving #HardLeetCodeInJava. 🧩 Problem: Regular Expression Matching.🛠️ Used 2D DP array to simulate pattern matching.💡 Learned how to manage multiple match states .⚠️ Edge case: When * matches zero characters or pattern starts with *. LINK:
0
0
6
Day 8 of solving #HardLeetCodeInJava. 🧩 Problem: First Missing Positive.🛠️ Solved with index placement, O(n) time, O(1) space.💡 Key learning: Don't rely on extra space .⚠️ Edge case: Ignore negatives & out-of-range values. LINK:
0
0
3
Day 1 of solving #HardLeetCodeInJava. 🧩 Problem: Median of Two Sorted Arrays.🛠️ Used merge technique to combine two sorted arrays.💡 Learned how to handle even/odd lengths while finding the median.⚠️ Edge case: One array might be empty. LINK:
0
0
1
Day 6 of solving #HardLeetCodeInJava. 🧩 Problem: Longest Valid Parentheses.🛠️ Used a stack to track indices & compute valid lengths.💡 Learned how base index (-1) helps track boundaries.⚠️ Edge case: Invalid closing brackets at the start. LINK:
0
0
3
Day 3 of solving #HardLeetCodeInJava. 🧩 Problem: Merge k Sorted Lists.🛠️ Used divide & conquer to merge linked lists recursively.💡 Learned how to merge two lists efficiently using dummy nodes.⚠️ Edge case: Empty list array. LINK:
0
0
2
Day 7 of solving #HardLeetCodeInJava. 🧩 Problem: Sudoku Solver.🛠️ Used backtracking with constraint checking (rows, cols, boxes).💡 Learned how early pruning speeds up recursion.⚠️ Edge case: Pre-filled board positions can mislead if not tracked. LINK:
0
0
1
Day 4 of solving #HardLeetCodeInJava. 🧩 Problem: Reverse Nodes in k-Group.🛠️ Used recursion + in-place reversal to reverse every k node.💡 Learned how to reverse a segment without altering node value.⚠️ Edge case: Remaining nodes < k stay unchanged. LINK:
0
0
3
Day 5 of solving #HardLeetCodeInJava. 🧩 Problem: Substring with Concatenation of All Words.🛠️ Used sliding window + HashMap to match word frequency.💡 Learned how to shift window using word size offset.⚠️ Edge case: Overlapping permutation of words. LINK:
0
0
3
Challenging myself to solve one LeetCode Hard problem in Java every day 💻.🧠 Sharing key learnings, tips and code along the way. Follow along: #HardLeetCodeInJava. Day 1 drops in the next tweet 👇.
0
0
2