Codeforcer's blog

By Codeforcer, history, 4 years ago, In English

I was solving this : https://leetcode.com/problems/minimum-jumps-to-reach-home/ and wrote essentially 2 same solutions, just the way of calculating transitions is a bit different. I get AC in one and RE in the second. I am not getting the reason for such a difference in results. So please help me understand.

One which gives RE
One which gives AC
The difference

As you can see logically both are correct then why the difference ?

Thanks!

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?