• + 0 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.