Two Sum
צביקה ברגר
בס"ד
https://leetcode.com/problems/two-sum/
בס"ד
Brute force
בס"ד
בס"ד
target = 10
בס"ד
target = 10
בס"ד
target = 10
בס"ד
target = 10
בס"ד
target = 10
בס"ד
target = 10
בס"ד
target = 10
בס"ד
target = 10
בס"ד
target = 10
Two Sum – Naive (Brute Force)
בס"ד
Sort and Binary Search
בס"ד
בס"ד
sort
בס"ד
target = 10
Binary search
find= 9
בס"ד
target = 10
Binary search
find= 9
בס"ד
target = 10
Binary search
find= 9
בס"ד
target = 10
Binary search
find= 8
בס"ד
target = 10
Binary search
find= 8
בס"ד
target = 10
Binary search
find= 8
Two Sum – Sort and Binary Search
בס"ד
Sort and Walking Inward
בס"ד
בס"ד
sort
בס"ד
target = 10
Walking Inward
בס"ד
target = 10
Walking Inward
בס"ד
target = 8
Walking Inward
בס"ד
target = 8
Walking Inward
בס"ד
target = 8
Walking Inward
בס"ד
target = 8
Walking Inward
בס"ד
target = 8
Walking Inward
Two Sum – Sort and Walking Inward
בס"ד
Hashing
בס"ד
בס"ד
target = 10
בס"ד
target = 10
5
בס"ד
target = 10
5 7
בס"ד
target = 10
5 7 9
בס"ד
target = 10
5 7 9 2
Two Sum - Hashing
בס"ד
Three Sum
בס"ד
Three Sum
בס"ד
gfh
בס"ד
gfh
בס"ד
Three Sum
בס"ד
בס"ד