01 · Question
Given an array nums with n objects colored red, white, or blue (0, 1, 2), sort them in-place so that objects of the same color are adjacent.
Use the Dutch National Flag algorithm in one pass.
01 · Question
Given an array nums with n objects colored red, white, or blue (0, 1, 2), sort them in-place so that objects of the same color are adjacent.
Use the Dutch National Flag algorithm in one pass.