Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __author__ = 'Reni A. Dantas'
- __version__ = '0.0.1'
- """
- Big O Notation:
- O(n): average performance
- O(n+n): fast performance but complex algorithm
- O(n*n) average performance too, consider as O(n)
- O(n**2) poor performance
- n log n
- """
- n = [x for x in range(0, 12)]
- def slicing(lista, partes):
- """
- Slice a list in many parts, consider that as O(n)
- """
- const_conj = conj = len(lista) // partes
- conj_l = []
- i = 0
- while i < len(lista):
- conj_l.append(lista[i:conj])
- i += const_conj
- conj += const_conj
- return conj_l
- print(slicing(n, 4))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement