• + 1 comment

    I don't think it's O(n^2). We are using only one for loop. Correct me if i ma wrong.