Sort Colors 🐘

Input: nums = [2,0,2,1,1,0]
Output: [0,0,1,1,2,2]
Input: nums = [2,0,1]
Output: [0,1,2]
  • n == nums.length
  • 1 <= n <= 300
  • nums[i] is either 0, 1, or 2.





Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

When the Host turns into a Parasite? — The Story about A Spooky Component in Microsoft Windows 10

Jay-Z Wants You To Let Go of Empty Friendships

Its the time for Quiz⁉️

Actually learning to code. The nitty gritty:

Requirements for Installing IBM Cloud Pak on Azure Redhat Openshift (ARO)

Deploying Conduit on Heroku

Here is the Legendary Key, mortal coil!


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tehleel Mir 🐢

Tehleel Mir 🐢

More from Medium

Implement strStr() 🚕

Trees In Java Explained In Detail

Bubble Sort Algorithm using Java

Unique Paths II (Java Code)