What would you like to master today?
Ask anything — concepts, complexity, patterns. Get a visual breakdown with concept tags.
Sliding window — turn O(N²) loops into O(N).
Imagine a window of length k sliding across an array. Instead of recomputing each subarray sum, you subtract the element leaving the window and add the one entering it.
Adaptive concepts for you
Curated by your SWOT & recent logs.
Space Complexity
Master O(1) vs O(N) memory allocation in recursion and iteration patterns.
Backtracking
Solve N-Queens, Sudoku and combinatorial search with clean recursion.
Prefix Sums
Range queries and subarray problems in linear time.
Monotonic Stack
Next-greater-element class of problems made trivial.
Peer discussion · #min-stack
Sarah_Dev4m
Has anyone solved 'Min Stack' with O(1) getMin?
AlexCodesjust now
Two stacks — one tracks values, one tracks running minimums. Push min on every op.
Mei1h
Pair: encode min-diff alongside each value to use a single stack.