Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 293 Bytes

File metadata and controls

10 lines (7 loc) · 293 Bytes

Find Minimum Jumps to reach ( M , N ) from ( 1, 1 ). If you are at ( X , Y ), then you can go to either ( X + Y , Y) or ( X , X + Y ). If it's not possible to reach ( M , N ), then return -1.

      M = 3,  N = 2 
      output = 2
      
      
      M = 2, N = 2
      output = -1