View Code? Open in Web Editor
NEW
This project forked from xxpasswd/algorithms-and-data-structure
数据结构和算法(python和c语言)
algorithms-and-data-structure's Introduction
Operation |
Big-O Efficiency |
index |
O(1) |
index assignment |
O(1) |
append(item) |
O(1) |
insert(i,item) |
O(n) |
pop() |
O(1) |
pop(i) |
O(n) |
get slice |
O(k) |
set slice |
O(n+k) |
del slice |
O(n) |
concatenate |
O(n) |
contain |
O(n) |
sort() |
O(nlogn) |
reverser() |
O(n) |
del operator |
O(n) |
iteration |
O(n) |
操作 |
效率 |
copy |
O(n) |
get(item) |
O(1) |
set(item) |
O(1) |
delete item |
O(1) |
contain |
O(1) |
iteration |
O(n) |
algorithms-and-data-structure's People
Contributors