← Questions
Largest permutation after sorting one fixed-length window
0
I was asked this
No reports yet. Sign in to say where you were asked it.
You get a permutation of 1 to n and a window size w. Exactly once, choose a contiguous window of exactly w elements and sort the elements inside it. Return the lexicographically largest array you can end up with.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
