I find the rule set is very much lacking and hard to figure out. For example why am I being failed for this one
[0, 11, 14, 17, 4, 18, 2, 3, 5, 7] 9
2 should equal 0
[5,14] , [2,11]
I could hazard a guess that you only look forward but then my code would have failed for the following which it is marked as passing
[4, 8, 12, 12, 3, 6, 2] 6
Test Passed
Are you modifying the input array? That can lead to the tests expecting a different output.
I find the rule set is very much lacking and hard to figure out. For example why am I being failed for this one
[0, 11, 14, 17, 4, 18, 2, 3, 5, 7] 9
2 should equal 0
[5,14] , [2,11]
I could hazard a guess that you only look forward but then my code would have failed for the following which it is marked as passing
[4, 8, 12, 12, 3, 6, 2] 6
Test Passed