Leet Code Style
Everything on SkillVeris tagged Leet Code Style — collected across the glossary, study notes, blog, and cheat sheets.
2 resources across 1 library
Interview Questions(2)
How Do You Find the Number of Subarrays That Sum to K?
You solve subarray-sum-equals-k in O(n) time by tracking a running prefix sum and a hash map of how many times each prefix sum value has occurred so far, since…
How Do You Find the Maximum in Every Sliding Window of Size K?
You solve sliding-window-maximum in O(n) time using a monotonic deque that stores indices in decreasing order of their values, so the front of the deque is alw…