A collection of Java programs for Complexity Analysis.
- Programs that end with SE have side effects
- Programs that end with RET have side effects, but also work with return values
- Programs that end with neither, have no side effects
Program | Time Complexity | Size Complexity |
---|---|---|
AVLTreeInsert | O(n*log(n)) | O(n) |
AVLTreeInsertConst | O(1)) | O(1) |
BuildAppend | O(n) | O(n) |
BuildIntList | O(n) | O(n) |
BuildIntListSE | O(n^2) | O(n) |
BuildList | O(n) | O(n) |
BuildTree | O(2^n) | O(2^n) |
BuildTreeConst | O(1) | O(1) |
CopyIntList | O(n) | O(n) |
DeleteLast | O(n) | O(n) |
DoubleIntListSE | O(n^2) | O(n) |
ListAddDepth | O(n^2) | O(n) |
ListAddLast | O(n^2) | O(n) |
ListBuildCount | O(n^2) | O(n) |
ListBuildCount2 | O(n^2) | O(n) |
ListDouble | O(n) | O(n) |
ListSetAllList | O(n) | O(n) |
ListSetAll | O(n) | O(n) |
ListSetAllSelf | O(n) | O(n) |
MergeSortSE | O(n*log(n)) | O(n) |
QuickSortSE | O(n*log(n)) | O(n) |
SelectionSortSE | O(n^2) | O(n) |
TreeDouble | O(n) | O(n) |
TreeExpand | O(n) | O(n) |
TwinTree | O(n^2) | O(n^2) |