Peak Value Processing Order
DoorDash interview questions · Medium · Coding round · 6 tests
Keep pulling out the smallest local peak - a value that beats every neighbor still in the list - and report the sequence in which the values disappear.
The full question, tests and reference solution are available with a plan that includes DoorDash.
Run your code with Ctrl+Enter to see results.