Arrays

Sort Colors (Dutch National Flag)

medium
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.
Hint steps(0/2 revealed)
  1. 1

    Complete previous step or reveal to unlock this hint.

  2. 2

    Complete previous step or reveal to unlock this hint.