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

πŸ’» SWE @ Bad Posture Factory sometime write in python code.lift.weight

India
Joined December 2022
Photo by Sumit G (@DevSumitG)Photo by Sumit G (@DevSumitG)Photo by Sumit G (@DevSumitG)Photo by Sumit G (@DevSumitG)Photo by Sumit G (@DevSumitG)Photo by Sumit G (@DevSumitG)Photo by Sumit G (@DevSumitG)Photo by Sumit G (@DevSumitG)Photo by Sumit G (@DevSumitG)Photo by Sumit G (@DevSumitG)
I just published The Perfect Structure for a Large, Production-Ready FastAPI App medium.com/p/the-perfect-str…
1
2
425
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
Day 314 of DSA πŸ“Œ LeetCode 76 β€” Minimum Window Substring Practised variable-size sliding window: Expand right until the window is valid. Track required character frequencies. Shrink left while the window remains valid. Keep the smallest valid window. #DSA #LeetCode
1
15
Day 313 of DSA | LeetCode 567 Revised Permutation in String. β†’ Build frequency counts for s1 β†’ Maintain a fixed-size window in s2 β†’ Update counts as the window moves β†’ Compare both frequency arrays β†’ All 26 counts match? Return True #LeetCode #Python #DSA
1
25
Day 312 of DSA | LeetCode 424 Revised Longest Repeating Character Replacement The pattern: β†’ Expand the window β†’ Track character frequencies β†’ Maintain max_frequency β†’ If window_size - max_frequency > k, shrink β†’ Update maximum length #LeetCode #Python #DSA #SlidingWindow
1
10
Day 311 of DSA | LeetCode 3 Revised Longest Substring Without Repeating Characters. The pattern: β†’ left + right pointers β†’ Maintain a window using a set β†’ Duplicate found? Move left and remove characters β†’ Update maximum window length #LeetCode #Python #DSA
1
18
Day 310 of DSA | LeetCode 121 Revised Best Time to Buy and Sell Stock. Track two variables: β†’ minPrice β€” lowest price so far β†’ maxProfit β€” best profit so far For every price: β†’ Calculate potential profit β†’ Update maximum profit β†’ Update minimum price #LeetCode #Python
1
15