Assignment 1 : Binary Search

Hi Guys, I am getting a test case failed remark in both test cases 4 and 5. Please let me know if my test case is correct or not?

TEST CASE #4 rotated n-1 times
Input:
{‘nums’: [3, 5, 7, 1]}
Expected Output:
3
Actual Output:
3

TEST CASE #5 rotated n times
Input:
{‘nums’: [1, 3, 5, 7, 9]}
Expected Output:
0
Actual Output:
0

I don’t think they mean the test cases you have in the notebook (albeit, it won’t hurt to check if they really work) but the hidden test cases, known only to those who did this assignment.

Reset your notebook (clear all the outputs) and rerun all cells to make sure the tests really work. Perhaps your implementation changed and you didn’t rerun the tests.

2 Likes

Thanks, Sebgolos
But I want to know - are my test cases correct?
This means that is this the correct output when we rotate array n-1 times -
{‘nums’: [3, 5, 7, 1]}
Expected Output:
3
and the second case - when we rotate n times
{‘nums’: [1, 3, 5, 7, 9]}
Expected Output:
0

They are ok.

Had to make the post a bit longer because of answer length limit.

@anuragjoshi70 test cases we run are different than the ones provided in the assignment notebook.

Hi there,
I am facing this error as well. i did not figure out solution yet

Go through your code again, Probably you are doing something wrong in the implementation of the code.