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.
"I checked if there were 6 consecutive Nodes with a snake head and if I found that true I return -1"- Though this might pass the test cases, I don't think this necessarily is true because there could be a ladder before a block of 6 snakes that "hops over" them.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Snakes and Ladders: The Quickest Way Up
You are viewing a single comment's thread. Return to all comments →
"I checked if there were 6 consecutive Nodes with a snake head and if I found that true I return -1"- Though this might pass the test cases, I don't think this necessarily is true because there could be a ladder before a block of 6 snakes that "hops over" them.