diff --git a/algorithms.md b/algorithms.md new file mode 100644 index 0000000..5d40022 --- /dev/null +++ b/algorithms.md @@ -0,0 +1,14 @@ + +## Sorting algorithm complexity +--- + +| 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 \ No newline at end of file