Problems: Longest Subarray with Sum K – uses prefix sum and hashmap for O(n) solution. Next Greater Element – solved efficiently using stack.
Problems:
Longest Subarray with Sum K – uses prefix sum and hashmap for O(n) solution.
Next Greater Element – solved efficiently using stack.