brute force approach would be to check every pair of elements for our conditions
π€What Did I Struggle With?
i dont think i was able to find the hashmap solution during the mock
π‘ Explanation of Solution
- use an unordered set `seen`
- iterate through the input array
- for each element x:
- check if 2*x or x/2 exist in our set
- if true, return true
- otherwise, add x to the set
- if no pair is found after iterating through the array, return false