summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-08-25 12:57:09 -0600
committermo khan <mo.khan@gmail.com>2020-08-25 12:57:09 -0600
commitb4e0004f9fd9c08dd0039f8bcbda5c7713751fea (patch)
tree20c5dac96d96eaeaeb25582834965036a4e98c0f
parent0ed0c36efe2bb83b7a2b399c1881201730a8e1ec (diff)
add yesterdays problem of the day
-rw-r--r--2020/08/24/README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/2020/08/24/README.md b/2020/08/24/README.md
new file mode 100644
index 0000000..0ba3f12
--- /dev/null
+++ b/2020/08/24/README.md
@@ -0,0 +1,12 @@
+│ Given a list of numbers, find if there exists a pythagorean triplet in
+│ that list. A pythagorean triplet is 3 variables a, b, c where a^2 + b^2
+│ = c^2
+│ Example:
+│Input: [3, 5, 12, 5, 13]
+│Output: True
+│
+│ Here, 5^2 + 12^2 = 13^2.
+│def findPythagoreanTriplets(nums):
+│ # Fill this in.
+│print findPythagoreanTriplets([3, 12, 5, 13])
+│# True