knaxuslearn · build · ship

Monotonic Stack

A stack kept in order, for "next greater" and span questions. 79 problems from 44 companies, most widely asked first. Tick them off as you go; your ticks stay in this browser.

problems
79
hard
31
done
0

79 of 79 problems

  1. 1Trapping Rain Water (opens LeetCode in a new tab)Array, Two Pointers, Dynamic ProgrammingHard26companies
  2. 2Sliding Window Maximum (opens LeetCode in a new tab)Array, Queue, Sliding WindowHard21companies
  3. 3Largest Rectangle in Histogram (opens LeetCode in a new tab)Array, Stack, Monotonic StackHard19companies
  4. 4Daily Temperatures (opens LeetCode in a new tab)Array, Stack, Monotonic StackMedium13companies
  5. 5Remove K Digits (opens LeetCode in a new tab)String, Stack, GreedyMedium12companies
  6. 6Next Greater Element I (opens LeetCode in a new tab)Array, Hash Table, StackEasy10companies
  7. 7Next Greater Element II (opens LeetCode in a new tab)Array, Stack, Monotonic StackMedium10companies
  8. 8Maximal Rectangle (opens LeetCode in a new tab)Array, Dynamic Programming, StackHard9companies
  9. 9Maximum Sum Circular Subarray (opens LeetCode in a new tab)Array, Divide and Conquer, Dynamic ProgrammingMedium9companies
  10. 10Number of Visible People in a Queue (opens LeetCode in a new tab)Array, Stack, Monotonic StackHard9companies
  11. 11Online Stock Span (opens LeetCode in a new tab)Stack, Design, Monotonic StackMedium8companies
  12. 12Remove Duplicate Letters (opens LeetCode in a new tab)String, Stack, GreedyMedium8companies
  13. 13Sum of Subarray Minimums (opens LeetCode in a new tab)Array, Dynamic Programming, StackMedium8companies
  14. 14Construct Binary Search Tree from Preorder Traversal (opens LeetCode in a new tab)Array, Stack, TreeMedium7companies
  15. 15Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit (opens LeetCode in a new tab)Array, Queue, Sliding WindowMedium7companies
  16. 16Shortest Subarray with Sum at Least K (opens LeetCode in a new tab)Array, Binary Search, QueueHard7companies
  17. 17Shortest Unsorted Continuous Subarray (opens LeetCode in a new tab)Array, Two Pointers, StackMedium7companies
  18. 18Smallest Subsequence of Distinct Characters (opens LeetCode in a new tab)String, Stack, GreedyMedium7companies
  19. 19132 Pattern (opens LeetCode in a new tab)Array, Binary Search, StackMedium6companies
  20. 20Car Fleet (opens LeetCode in a new tab)Array, Stack, SortingMedium6companies
  21. 21Count Subarrays With Fixed Bounds (opens LeetCode in a new tab)Array, Queue, Sliding WindowHard6companies
  22. 22Final Prices With a Special Discount in a Shop (opens LeetCode in a new tab)Array, Stack, Monotonic StackEasy6companies
  23. 23Max Chunks To Make Sorted (opens LeetCode in a new tab)Array, Stack, GreedyMedium6companies
  24. 24Minimum Number of Increments on Subarrays to Form a Target Array (opens LeetCode in a new tab)Array, Dynamic Programming, StackHard6companies
  25. 25Continuous Subarrays (opens LeetCode in a new tab)Array, Queue, Sliding WindowMedium5companies
  26. Showing 25 of 79

"Companies" counts the companies in DSA Atlas that have asked the problem at any time. Patterns and data structures come from LeetCode topic tags. Your ticks are saved in this browser only, and shared with the company pages.

Credits

These lists are the work of two open GitHub projects. Thank you to their authors.

Problem text stays on LeetCode; we link to it. Frequencies are relative within a company.

Last synced