You are viewing a single comment's thread. Return to all comments →
No, it will still be O(n), that's the definition of big-O notation. Simply think like below. k values(i/p size) loop rotation 1 1 100 100 n n
Hence order is n. We should not take input size constant while calculating time complexity.
Seems like cookies are disabled on this browser, please enable them to open this website
Cycle Detection
You are viewing a single comment's thread. Return to all comments →
No, it will still be O(n), that's the definition of big-O notation. Simply think like below. k values(i/p size) loop rotation 1 1 100 100 n n
Hence order is n. We should not take input size constant while calculating time complexity.