- Quiz
- Test Cases
- Solution
- Solution 1
- Solution 2
Test Case 1
Input
arr = [0, 1, 21, 33, 45, 45, 61, 71, 72, 73] target = 33
Output
3
Test Case 2
Input
arr = [0, 1, 21, 33, 45, 45, 61, 71, 72, 73] target = 35
Output
-1
Test Case 3
Input
arr = [1, 3, 5, 7, 8, 9] target = 5
Output
2
Test Case 4
Input
arr = [] target = 0
Output
-1
Test Case 5
Input
arr = [1, 1, 1] target = 0
Output
-1
- My Answer
- Lecture
- Output