dsa1 min read
Backspace String Compare — Two Pointer O(1) Space
Compare two strings after applying backspace characters in O(1) space by scanning from right with skip counters.
Read →
1575 articles
Compare two strings after applying backspace characters in O(1) space by scanning from right with skip counters.
Track the minimum number of operations to return to the main folder by simulating directory navigation with a depth counter.
Count ping requests within the last 3000ms using a queue that slides expired entries off the front.
Remove adjacent pairs of same letters with different cases using a stack to build the result character by character.
Find how many days until a warmer temperature using a monotonic decreasing stack of unresolved day indices.