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.
Nice job. You might want to try improving the runtime by only iterating up to the square root of n instead of n like this to improve your runtime from O(n) to O(n^(1/2)).
Day 19: Interfaces
You are viewing a single comment's thread. Return to all comments →
Nice job. You might want to try improving the runtime by only iterating up to the square root of n instead of n like this to improve your runtime from O(n) to O(n^(1/2)).
Hope this helps.
HackerRank solutions.