Skip to content

Latest commit

 

History

History
22 lines (21 loc) · 554 Bytes

time-complexities.md

File metadata and controls

22 lines (21 loc) · 554 Bytes

Arrays

MDN

Fn Big O
pop() O(1)
push() O(1)
unshift() O(n)
shift() O(n)
reverse() O(n)
reduce() O(n)
forEach() O(n)
map() O(n)
filter() O(n)
find() O(n)
some() O(n)
every() O(n)
splice() O(n)
slice() O(n)
indexOf() O(n)
concat() O(m+n)
sort() O(nlogn)