01 · Measured results
Every operation, side by side.
actual runtime · ms
O(n)O(n²)O(n log n)
02 · Runtime table
Theoretical complexity vs. actual runtime.
| Operation | Theoretical complexity | Actual runtime (ms) |
|---|---|---|
| File reading | O(n) | 106 |
| Demand score calculation (processing) | O(n) | 98 |
| File writing (unsorted) | O(n) | 48 |
| Selection Sort | O(n²) | 45 |
| Insertion Sort | O(n²) | 26 |
| Merge Sort | O(n log n) | 17 |
| Quick Sort | O(n log n) | 22 |
The console output behind these numbers is in Appendix C · Full run pictures. For why the dataset size matters, see Interpretation of results.