Today I 4Sum problem
Built on 2Sum/3Sum using the Two-Pointer + Sorting pattern to cut time from O(n^4) → O(n^3).
Mastering patterns > memorizing solutions.
#DSA#4Sum#Coding#LeetCode#ProblemSolving
Solved 3Sum Problem Today
Pattern: Two Pointers + Sorting
Fix one number, use two pointers for the remaining pair
Skip duplicates smartly
Time Complexity: O(n²)
Subproblems: 2Sum, duplicate handling
#DSA#LeetCode#Coding#100DaysOfCode#FAANGPrep#code#tech
8th day of learning DSA.
Rotate Array - LeetCode
Solved using reversal technique: reverse all, reverse first k, reverse rest.
Big-O = O(n) | O(1)
Great example of array manipulation via subproblems
#100DayChallenge#code#tech#Coding#DSA
Day 7 of learning DSA.
I solved Trapping Rain Water — a classic Array + Two Pointer problem!
Big O - O(n) | 💾 O(1)
A must-solve to master logic and edge case handling.
#DSA#LeetCode#Coding#JavaScript#code#tech
Today's Problem:
Container With Most Water
1. Use two pointers: left & right
2. Move the pointer with smaller height
3. Track max area at each step
🕒 Time: O(n)
📦 Space: O(1)
#LeetCode#DSA#Algorithms#JavaScript#code
4th day of learning DSA.
Solved Move Zeroes on LeetCode
Used the two-pointer technique move all 0s to the end in-place.
Time Complexity: O(n) time
Space Complexity: O(1) space
One more step toward cleaner, faster code 💪
#LeetCode#JavaScript#100DaysOfCode#dsa
Stated learning dsa solved my first leetcode problem.
Confused with dsa patterns which to start with any suggestion or resources to learn about dsa patterns would be very helpful.