algorithm | time complexity (best, avg, worst) | space | stable |
---|---|---|---|
selection | n^2 n^2 n^2 | constant | false |
bubble | n n^2 n^2 | constant | true |
insertion | n n^2 n^2 | constant | true |
heap | nlogn nlogn nlogn | constant | false |
quick | nlogn nlogn n^2 | constant | false |
merge | nlogn nlogn nlogn | n | true |
bucket | n + k n + k n + k | nk | |
radix | nk nk nk |
provides asymptotic analysis (time complexity) for many of the recursion algorithms that follow the patter of divide-and-conquer.
• a basic data type provided by the programming language.
- chars, int, floats, fixed-points, booleans, pointers
• a built-in type is a data type for which the programming language provides built-in support.
- tuple, list, complex number, rational number, arrays
- first-class function - JS, Lua, Go, Java, C++, C#