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 just thought it was such a small constraint that it would work as a solution.
It would be like me passing you an ascii string and length and saying you need to return true if there are duplicates. If you checked the length to see if it was greater than 255 and returned true if so, that is a nice optimization that shows you were thinking instead of regurgitating some memorized solution.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Linked Lists: Detect a Cycle
You are viewing a single comment's thread. Return to all comments →
I just thought it was such a small constraint that it would work as a solution.
It would be like me passing you an ascii string and length and saying you need to return true if there are duplicates. If you checked the length to see if it was greater than 255 and returned true if so, that is a nice optimization that shows you were thinking instead of regurgitating some memorized solution.