We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Oh, now I get your point. You are just trying to say that I shouldn't have written "no ladder" because there will always be one ladder atleast. Actually, shivaaryan was discussing about the solution I proposed, and he was curious if the solution would be able to handle all the cases well. Hence, he gave me following case (as you can see in his comment) :
Thus, I replied that this particular case would be handled well by the "2nd step Ladders" of the solution. While clarifying it further, I wrote : even if that ladder(37->99) wasn't present, we'll still get the answer "-1". So, "no ladder" just meant "no ladder to 99", because of this particular case with just one ladder.
I am also aware the problem states that there will be atleast one ladder, but, I was just discussing that particular case there. Though, its a valid point that it can confuse someone-else too, hence, I have modified "(no ladder)" to "(no ladder to 99)" to avoid any further misinterpretations.
Snakes and Ladders: The Quickest Way Up
You are viewing a single comment's thread. Return to all comments →
Oh, now I get your point. You are just trying to say that I shouldn't have written "no ladder" because there will always be one ladder atleast. Actually, shivaaryan was discussing about the solution I proposed, and he was curious if the solution would be able to handle all the cases well. Hence, he gave me following case (as you can see in his comment) :
Thus, I replied that this particular case would be handled well by the "2nd step Ladders" of the solution. While clarifying it further, I wrote : even if that ladder(37->99) wasn't present, we'll still get the answer "-1". So, "no ladder" just meant "no ladder to 99", because of this particular case with just one ladder.
I am also aware the problem states that there will be atleast one ladder, but, I was just discussing that particular case there. Though, its a valid point that it can confuse someone-else too, hence, I have modified "(no ladder)" to "(no ladder to 99)" to avoid any further misinterpretations.