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.
The issue was on the last line of code, where I was looking for the max lenght for every n. I've just created a second list with the actual results for each n before reading the input and it worked!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #14: Longest Collatz sequence
You are viewing a single comment's thread. Return to all comments →
The issue was on the last line of code, where I was looking for the max lenght for every n. I've just created a second list with the actual results for each n before reading the input and it worked!