Sort Colors (Dutch National Flag) — JavaScript medium interview problem
Given an array `nums` with n objects colored red(0), white(1), or blue(2), sort them in-place so same colors are adjacent in order 0,1,2. Return the array.
Tags: two-pointers, dutch-flag
Practice this Arrays problem free in the JS Interview Playground with automated tests and unlockable solutions.