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.
Thank you. This I will consider O(1) as this requires constant time operations for calculating t and not making a table first and then searching in it. And I think we can assume log2(x) as constant time operation as it requires calculating few terms in some series. (exact algorithm not sure, may be taylor series).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Strange Counter
You are viewing a single comment's thread. Return to all comments →
Thank you. This I will consider O(1) as this requires constant time operations for calculating t and not making a table first and then searching in it. And I think we can assume log2(x) as constant time operation as it requires calculating few terms in some series. (exact algorithm not sure, may be taylor series).