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.
you see O(1) means that its constant time but the constant(Eg:O(1000000)=O(1)) however big is rewritten as O(1) for the sake of simplicity. well maybe what he is trying to say is that maybe his constant is smaller(i am not sure if it is). i i am just trying to tell you that Alg1 maybe faster than Alg2 even though both of them hve the complexity of O(1).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and The Beast
You are viewing a single comment's thread. Return to all comments →
you see O(1) means that its constant time but the constant(Eg:O(1000000)=O(1)) however big is rewritten as O(1) for the sake of simplicity. well maybe what he is trying to say is that maybe his constant is smaller(i am not sure if it is). i i am just trying to tell you that Alg1 maybe faster than Alg2 even though both of them hve the complexity of O(1).