Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
@MSKose modifying lists like this (eg.
x = x[1:]
orfoo = [1,2,3] + x
) are O(n) operations themselves already, so since they are in a loop, the whole thing is O(n^2)@FArekkusu
Are you sure this code is O(n^2)? It appears to me that it is O(n), as it loops as many times as there are segments of 8 bytes in the input list
Of course, but it doesn't have to add 1 ... twice every time 😉
;D
Because it's
O(n^2)
when an obviousO(n)
solution exists?<3