AlgoMaster Logo

Find the Most Competitive Subsequence

nums=[3, 5, 2, 6],k=2
0 / 14
algomaster.io
Step:Brute force: try every length-2 subsequence, keep the most competitive.