-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hi, looks like your code gives %100 results on the codility test cases. But there is a mistake.
Let's say our input is that :
vector vec = {-2, -1, 0 , 4};
According to your code, function returns 0 because of this line :
if ( A[2] == 0 ) return A[0] * A[1] * A[2];
i think , it should be something like this
if ( A[2] == 0 ) return A[0] * A[1] * A[3];
it gives 8.
Such a test scenario may not have come across on the Codility site.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels