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.
do not understand the rule.
in the example,
if chip ends up at filed 2, and if the init location is 2, the number we rolls should be 0 or 2. if we rolls 2, it means that the chip from 2->3 and then rollback from 3->2. there are 2 steps(the number we rolled out). otherwise, if should be on field 4( from 2->3 and the 3->4).
it looks like the rule is rollback from 3.
but,
if chip ends up at field 3, and if the init location is 3, the number we rolls should be 0 or 2. if we rolls 2, it means that the chip from 3->4 and then rollback form 4->3. otherwise, it couldn't ends up at filed 3.
hence, the example is conflict at the rollback rule.
How can I make sure the rollback rule?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Definite Random Walks
You are viewing a single comment's thread. Return to all comments →
do not understand the rule. in the example, if chip ends up at filed 2, and if the init location is 2, the number we rolls should be 0 or 2. if we rolls 2, it means that the chip from 2->3 and then rollback from 3->2. there are 2 steps(the number we rolled out). otherwise, if should be on field 4( from 2->3 and the 3->4). it looks like the rule is rollback from 3. but, if chip ends up at field 3, and if the init location is 3, the number we rolls should be 0 or 2. if we rolls 2, it means that the chip from 3->4 and then rollback form 4->3. otherwise, it couldn't ends up at filed 3. hence, the example is conflict at the rollback rule. How can I make sure the rollback rule?