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.
I usually analyze runtimes assuming variables are unbounded. I find it to be more useful that way since HackerRank usually creates arbitrary bounds for variables.
In the bounded case, you are correct, you can consider it to be O(N).
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
I usually analyze runtimes assuming variables are unbounded. I find it to be more useful that way since HackerRank usually creates arbitrary bounds for variables.
In the bounded case, you are correct, you can consider it to be O(N).
HackerRank solutions.