Given a list of numbers, the function will return the index of the number if it exists in the list. If it does not exist, the function will return -1.
The candidate's solution correctly solves the problem. However, it is not the most efficient solution. A more efficient solution would be to use a binary search algorithm, which would run in O(log n) time.
Evaluated at: 2022-12-02 06:15:34