๐ Day 20/100 โ DSA Streak ๐ฅ
๐ง Solved:
LeetCode 19 โ Remove Nth Node From End of List
๐ก Takeaway: Keep a fixed gap between two pointers. When the fast pointer reaches the end, the slow pointer is at the node to remove.
#DSA#LeetCode#100DaysOfDSA#TwoPointers#Day20
๐ Day 19/100 โ DSA Streak ๐ฅ
๐ง Solved:
LeetCode 876 โ Middle of the Linked List
LeetCode 141 โ Linked List Cycle
LeetCode 287 โ Find the Duplicate Number
#DSA#LeetCode#100DaysOfDSA#TwoPointers#Day19
๐ Day 17/100 โ DSA Streak ๐ฅ
๐ง Solved:
LeetCode 283 โ Move Zeroes
LeetCode 27 โ Remove Element
๐ก Takeaway: Use Two Pointers to process the array in-place while keeping the required elements and avoiding extra space.
#DSA#LeetCode#100DaysOfDSA#TwoPointers#Day17
๐ Day 16/100 โ DSA Streak ๐ฅ
๐ง Solved: LeetCode 26 โ Remove Duplicates from Sorted Array
๐ก Takeaway: Since the array is sorted, use two pointers to keep unique elements in-place without extra space.
#DSA#LeetCode#100DaysOfDSA#TwoPointers#Day16
๐ Day 15/100 โ DSA Streak ๐ฅ
๐ง Solved: LeetCode 11 โ Container With Most Water
๐ก Takeaway: Area = width ร shorter height. Since width decreases, move the shorter side to find a taller boundary and maximize the area.
#DSA#LeetCode#100DaysOfDSA#TwoPointers#Day15
๐ Day 14/100 โ DSA Streak ๐ฅ
๐ง Solved:
LeetCode 1 โ Two Sum
LeetCode 15 โ 3Sum
LeetCode 16 โ 3Sum Closest
๐ก Takeaway: Sorting + Two Pointers can reduce nested brute-force searches and make pair/triplet problems much more efficient.
#DSA#LeetCode#100DaysOfDSA#CodingJourney