Problem 1673 · Medium

Find the Most Competitive Subsequence

Choose a subsequence of a fixed length that is as small as possible in lexicographic order. The visual uses a stack, popping larger values while enough elements remain.

Open the interactive visualisation