What could be the big O of this code?
I thought --> n + n/2 + n/3 + .....+1 which is just n, but also looks like O(n^2)
public int sums(int n){
int sum = 0;
for (int i = 1; i < n; i++) {
for (int j = 0; j < n/i; j++) {
sum++;
}
}
return sum;
}