1
+ 5 -- 6
+ 5 -- 11
+ 5 -- 16
+ 5 -- 21
+ 5 -- 26 > 24, returns null
x 3 -- 63 > 24, returns null
x 3 -- 38
...
...
This is what is happening. You go deeper in the recursion. You go to a place where there is no going forward. So, you go back to the place before the current state. That is why when you are not able to proceed further with 21
, recursion unwinds and lets you proceed the other path from 16
. That is why start
is 16
again.