dsa2 min read
Word Ladder — BFS Shortest Transformation Path
Find the shortest word transformation sequence using BFS where each step changes exactly one character.
Read →
1575 articles
Find the shortest word transformation sequence using BFS where each step changes exactly one character.
Evaluate a string expression with +, -, *, / using a stack that handles operator precedence without parentheses.
Detect a 132 pattern (i < j < k, nums[i] < nums[k] < nums[j]) using a monotonic stack scanning right to left.
Count visible people in a queue for each person using a monotonic decreasing stack scanning right to left.
Implement a circular queue using a fixed-size array with head and tail pointers and a size counter.