Commit 28ee8b9

mo khan <mo.khan@gmail.com>
2020-08-17 02:00:58
Add daily problem of the day
1 parent bf26bed
Changed files (1)
2020
2020/08/16/README.md
@@ -0,0 +1,14 @@
+│   Given a list of numbers with only 3 unique numbers (1, 2, 3),
+│sort the
+│   list in O(n) time.
+│   Example 1:
+│Input: [3, 3, 2, 1, 3, 2, 1]
+│Output: [1, 1, 2, 2, 3, 3, 3]
+│
+│def sortNums(nums):
+│  # Fill this in.
+│print sortNums([3, 3, 2, 1, 3, 2, 1])
+│# [1, 1, 2, 2, 3, 3, 3]
+│
+│   Challenge: Try sorting the list using constant space.
+