In the Java solution, why does the if condition have i != 1 ? Isn’t that redundant?
In a case where the arrays are - A=[3,0,4,-1] , B=[3,0,-2,5] , Your solution will not work.
In the Java solution, why does the if condition have i != 1 ? Isn’t that redundant?
In a case where the arrays are - A=[3,0,4,-1] , B=[3,0,-2,5] , Your solution will not work.