dsa2 min read
Increasing Triplet Subsequence [Medium] — Greedy Two Trackers
Determine if there exists an increasing subsequence of length 3 using two greedy variables in O(n) time O(1) space.
Read →
webcoderspeed.com
1276 articles
Determine if there exists an increasing subsequence of length 3 using two greedy variables in O(n) time O(1) space.
Find all unique quadruplets summing to target by extending the 3Sum pattern with an outer loop and duplicate skipping.
Find minimum number of jumps to reach the last index using greedy BFS-style level tracking.
Determine the unique starting gas station for a circular route using a greedy one-pass algorithm.
Find how many days until a warmer temperature for each day using a monotonic decreasing stack.