Sponsored
Use these hints if you're stuck. Try solving on your own first.
What information do the two largest elements tell us?
Can we use recursion to check all possible states?
Solve with full IDE support and test cases