Sort colours

Run Settings
LanguageJava
Language Version
Run Command
class Main { /* Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. Here, we will use integers 0, 1, and 2 to represent the color red, white, and blue respectively. nums = [2, 0, 2, 1, 1, 0] output = [0, 0, 1, 1, 2, 2] */ public static void main(String[] args) { System.out.println("Hello World!"); } }
Editor Settings
Theme
Key bindings
Full width
Lines