Is my time complexity too high?
Yes, it is. You need an O(n) solution, not an O(n^2) one.
I think it is too high. There are some cases with really large numbers, with 1 for loop is enough.
Loading collection data...
Yes, it is. You need an O(n) solution, not an O(n^2) one.
I think it is too high. There are some cases with really large numbers, with 1 for loop is enough.