Memoization and RE

Правка en3, от Codeforcer, 2021-05-25 11:46:18

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!

Теги memoization, dp, help, re

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Codeforcer 2021-05-25 11:46:18 2 Tiny change: ' I do this.\n ' -> ' I do this\n '
en2 Английский Codeforcer 2021-05-25 11:31:24 70
en1 Английский Codeforcer 2021-05-25 11:24:47 2704 (published)