LogIn
I don't have account.
Question 1
How do you efficiently check if an array contains a duplicate in O(n) time complexity?
1
Use a binary search
2
Use a hash set
3
Use a nested loop
4
Sort and check adjacent elements
Question 2
which algorithm would you use to solve a maze problem?
1
Binary search
2
Depth-first search
3
Bubble sort
4
Linear search