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.
Thanks for hints. I tried a few different way but returned to your method after 2 days. In projecteuler original problem I used DFS, but here it was giving weird paths (WRONG, MHG, SMHG, RONG, TONG, NG, HG, ONG). Last method that I had used was finding isolated vertices, adding last item to result and removing it from graph. But only got 4 correct answer with it (10 points). With your way now I got 90 score. Still 2 WA to go :)
Edit: Got 100 score, next hint was in problem description
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #79: Passcode derivation
You are viewing a single comment's thread. Return to all comments →
Thanks for hints. I tried a few different way but returned to your method after 2 days. In projecteuler original problem I used DFS, but here it was giving weird paths (WRONG, MHG, SMHG, RONG, TONG, NG, HG, ONG). Last method that I had used was finding isolated vertices, adding last item to result and removing it from graph. But only got 4 correct answer with it (10 points). With your way now I got 90 score. Still 2 WA to go :)
Edit: Got 100 score, next hint was in problem description