arr = [1, 2, 5, 6, 7]
total = 0
for i in range(len(arr)):
total += sum(arr[i:])
Is the time complexity for the above code is O(n^2) or O(n^3), the confusion because of the slicing of the list arr. So how does slicing arr effects the time complexity?