Problem bank
EasySliding WindowNeetCode 150 · #15/150

Best Time to Buy and Sell Stock

  1. 1
    Learn the pattern

    Contiguous subarray + constraint → expand right, shrink left while invalid. Track the best window seen.

  2. 2
    Trace your version

    Paste your solution into the workspace and watch every step execute.

    Open workspace
  3. 3
    Solve it

    Solve it on LeetCode, then mark it solved here to keep your streak alive.

Trapping Rain WaterLongest Substring Without Repeating Characters