Find index.

Write a program , given a matrix with 0’s and 1’s , you enter the matrix at (0,0) in left to right direction , whenever you encounter a 0 you retain in same direction , if you encounter a 1’s you have to change direction to right of current direction and change that 1 value to 0, you have to find out from which index you will leave the matrix at the end.

Author: Amit Khandelwal 1
Login to Answer
Sort By:
Oldest
|
Newest
|
Vote
|
My Answer