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.
This is a really cool observation :-) But what will be the time complexity of this one? The LCM solution is O(N*log(N)) approximately.
Here, for this solution is it pi(N)*log(N) = O(N) approx.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #5: Smallest multiple
You are viewing a single comment's thread. Return to all comments →
This is a really cool observation :-) But what will be the time complexity of this one? The LCM solution is O(N*log(N)) approximately. Here, for this solution is it pi(N)*log(N) = O(N) approx.