Sort Colors In-Place

Sort Colors In-Place

Given an integer array nums of length n, where every element is either 0, 1, or 2 representing three colors, sort the array in place so that equal colors are adj...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: