I have searched a bit on StackOverflow and have understood the complexity up to the point of the j-loop, which is O(n2). However with the nested addi
O(n2)
the k-loop has O(j-i) complexity
the j-loop has O((n-i)*(n-i)) complexity
the i-loop has O(n*n*n)=O(n^3) complexity
anyway, you know that it is not O(n^2) because the first two loops are O(n^2) and it is not more than O(n^3) because there are only 3 loops