summaryrefslogtreecommitdiff
path: root/2020
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-08-18 15:48:40 -0600
committermo khan <mo.khan@gmail.com>2020-08-18 15:48:40 -0600
commit10e476715dbdaa643ce592819b915ad01ca761ae (patch)
treedc9c43c841abe39a3d46bf24b88ff6e261aec6f2 /2020
parent48cfcfb63c173809e0d3b0ab7bc5aa162b6a298b (diff)
Add problem of the day
Diffstat (limited to '2020')
-rw-r--r--2020/08/18/README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/2020/08/18/README.md b/2020/08/18/README.md
new file mode 100644
index 0000000..a69a1e3
--- /dev/null
+++ b/2020/08/18/README.md
@@ -0,0 +1,13 @@
+│ Given a list of numbers, where every number shows up twice except for
+│ one number, find that one number.
+│ Example:
+│Input: [4, 3, 2, 4, 1, 3, 2]
+│Output: 1
+│
+│ Here's the function signature:
+│def singleNumber(nums):
+│ # Fill this in.
+│print singleNumber([4, 3, 2, 4, 1, 3, 2])
+│# 1
+│
+│ Challenge: Find a way to do this using O(1) memory.