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.
Does anyone think it is possible to meet the performance requirements with clojure? It seems not, given that no one has even come close. I have an algorithm that is O(nlogn) to initialize, and basically O(1) for each query and update. I know, technically it has to be at least O(logn) but the coefficient seems small enough that for the sizes here the performance is relatively constant across all the tests.
I agree with @paulpach... it's an interesting challenge to find the right algo and learn about "mutable" structures in clojure. Would be more interesting if it was known to be solvable!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Multiple
You are viewing a single comment's thread. Return to all comments →
Does anyone think it is possible to meet the performance requirements with clojure? It seems not, given that no one has even come close. I have an algorithm that is O(nlogn) to initialize, and basically O(1) for each query and update. I know, technically it has to be at least O(logn) but the coefficient seems small enough that for the sizes here the performance is relatively constant across all the tests.
I agree with @paulpach... it's an interesting challenge to find the right algo and learn about "mutable" structures in clojure. Would be more interesting if it was known to be solvable!