def func(n): count = 0 for i in range(n): for j in range(i, n): count += 1 return count
O(n)
O(n²)
O(logn)
O(nlogn)