i am not able to write the terminating condition in while loop
pz help
Plz check the while condition
u will start searching from top right (i,j).
so u termination condition should be i>=n || j<0
not working
see that is ur termination condition.
inside while loop u should specify condition ,till when ur while loop should run.
so it should be while( (i<n && j>=0 ) n in ur case should be 3