Algorithm · Meta · Hard
The exercise covers three implementation tasks plus a short design discussion. It tests in-place array compaction, efficient search for a longest path on a grid, and graph-based candidate ranking for recommendations. Part 1: In-place Unique Prefix You receive an integer array nums sorted in nondecreasing order. Rearrange nums in place so every distinct value appears once at the front, with their original relative order preserved. Return the number of positions in this unique…
Checking your access…