summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-08-17 10:43:08 -0600
committermo khan <mo.khan@gmail.com>2020-08-17 10:43:08 -0600
commit48cfcfb63c173809e0d3b0ab7bc5aa162b6a298b (patch)
tree1072a6a75a3f2b2bb18e246964c8d04e199c59b6
parent3ee369b1e57c4547ed7861bd66af0c1db5d7769d (diff)
Add write up on possible solutions for two sum
-rw-r--r--2020/08/17/TwoSum.pdfbin0 -> 449401 bytes
-rw-r--r--2020/08/17/main.rb4
2 files changed, 4 insertions, 0 deletions
diff --git a/2020/08/17/TwoSum.pdf b/2020/08/17/TwoSum.pdf
new file mode 100644
index 0000000..0775d63
--- /dev/null
+++ b/2020/08/17/TwoSum.pdf
Binary files differ
diff --git a/2020/08/17/main.rb b/2020/08/17/main.rb
index 34ba708..f457119 100644
--- a/2020/08/17/main.rb
+++ b/2020/08/17/main.rb
@@ -22,4 +22,8 @@ end
=end
assert(Solution.run([4, 7, 1, -3, 2], 5))
+assert(!Solution.run([], 5))
+assert(!Solution.run([1], 5))
+assert(Solution.run([1,-3,7,8], 5))
+assert(Solution.run([3,1,3], 6))
puts "Yay!"