Skip to content

Commit dc1fc3b

Browse files
committed
Slow twosum solution
1 parent 67394ff commit dc1fc3b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test_module/hello.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Hello.py: A sample python script used for testing reviews
22

3-
def helloWorld():
4-
print("Hello World")
3+
def twoSum(array, targetSum):
4+
for i in range(0, len(array)):
5+
for j in range(i+1, len(array)):
6+
if array[i] + array[j] == targetSum:
7+
return ([array[i], array[j]])
8+
return []
59

6-
helloWorld()
10+
twoSum([2,7,11,15], 9)
11+

0 commit comments

Comments
 (0)