Given an array of elements, implement a function that modifies the array in-place to the next lexicographically greater permutation. If no such permutation exists, rearrange it to the lowest possible…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.