Sumit G (@DevSumitG) header
Sumit G (@DevSumitG) profile picture

๐Ÿ’ป SWE @ Bad Posture Factory sometime write in python code.lift.weight

India
Joined December 2022
Day 329 of DSA ๐Ÿ“Œ LeetCode 239 โ€” Sliding Window Maximum Revised the Heap approach. Store (value, index). Push incoming elements. Remove expired indices. Track the maximum for each window. Heap + Sliding Window! #DSA #LeetCode
2
6
Day 328 of DSA Sliding Window revision day! ๐Ÿ“Œ LeetCode 424 โ€” Character Replacement ๐Ÿ“Œ LeetCode 567 โ€” Permutation in String ๐Ÿ“Œ LeetCode 76 โ€” Minimum Window Substring Revised variable windows, fixed windows, and frequency tracking. #DSA #LeetCode
1
9
Day 327 of DSA ๐Ÿ“Œ LeetCode 424 โ€” Character Replacement Sliding Window + HashMap Key condition: window_size - max_freq > k Track frequencies, expand right, shrink left when needed, and update max length. Getting better with revision! #DSA #LeetCode
1
10
Day 326 of DSA ๐Ÿ“Œ LeetCode 3 โ€” Longest Substring Without Repeating Characters Variable Sliding Window: Expand right. Shrink left while duplicates exist. Track max valid window length. Revisiting this pattern. Good practice! #DSA #LeetCode
2
26
Day 325 of DSA ๐Ÿ“Œ LeetCode 121 โ€” Best Time to Buy and Sell Stock Busy day, just revisited this one. Track min_price and max_profit in one pass. Simple approach, important pattern! #DSA #LeetCode
1
9
Day 324 of DSA ๐Ÿ“Œ LeetCode 239 โ€” Sliding Window Maximum Revisited this one today. Guessed Heap would help. Maintaining it and removing outdated elements was the tricky part. Once the window movement clicked, the problem felt much easier! #DSA #LeetCode
1
10
Day 323 of DSA ๐Ÿ“Œ LeetCode 76 โ€” Minimum Window Substring Variable Sliding Window + Frequency Array. Track required character counts. Expand right to find a valid window. Shrink left to minimize it. Store the smallest valid substring. #DSA #LeetCode
2
18
Day 322 of DSA ๐Ÿ“Œ LeetCode 567 โ€” Permutation in String Fixed Window + Frequency Arrays. The key: Remove outgoing character. Add incoming character. Compare both frequency arrays. No rebuilding the array for every window! #DSA #LeetCode
2
21
Day 321 of DSA ๐Ÿ“Œ LeetCode 424 โ€” Longest Repeating Character Replacement Sliding Window + HashMap Key formula: window_size - max_freq <= k Track frequencies, expand right, and shrink left when replacements exceed k. Interesting pattern, but edge cases need more practice! #DSA
2
Day 320 of DSA ๐Ÿ“Œ LeetCode 3 โ€” Longest Substring Without Repeating Characters Revised this after a while. Used pen and paper, worked through the pointers, and solved it myself! Sliding Window + Set: Expand right. Remove duplicates from left. Track max length. #DSA #LeetCode
1
29
Day 319 of DSA ๐Ÿ“Œ LeetCode 121 โ€” Best Time to Buy and Sell Stock Busy day today. Focused on revising sliding window problems. I'm realizing sliding window is one of my weaker topics. Understanding a solution is one thing; implementing it independently is another #DSA #LeetCode
2
9
Day 318 of DSA ๐Ÿ“Œ LeetCode 1652 โ€” Defuse the Bomb Sliding Window + Circular Array: Handle k == 0 separately. Use modulo (% n) for circular indexing. Calculate the initial window sum. Slide the window by removing the outgoing value and adding the incoming one. #DSA #LeetCode
1
9
Day 317 of DSA ๐Ÿ“Œ LeetCode 904 โ€” Fruit Into Baskets Variable-size Sliding Window: Use a hashmap to track fruit frequencies. Expand right to add fruits. If distinct fruit types exceed 2, shrink from left. Remove keys when their frequency reaches zero. Track the maximum window len
1
9
Day 316 of DSA ๐Ÿ“Œ LeetCode 1456 โ€” Maximum Number of Vowels in a Substring of Given Length Fixed-size Sliding Window: Count vowels in the first k characters. Remove the outgoing character's contribution. Add the incoming character's contribution. Track the maximum count. #DSA
1
4
Day 315 of DSA ๐Ÿ“Œ LeetCode 239 โ€” Sliding Window Maximum Brute force: Find the maximum in every window. Optimized: Monotonic decreasing Deque. Store indices, not values. Remove expired indices. Remove smaller elements from the back. Front always holds the current maximum. #DSA
1
8