benchmark
Run code with increasing input sizes to measure execution time and fit growth curves for estimating Big-O complexity.
Instructions
Empirically measure time complexity by running code at increasing input sizes.
Contract: the code must read an integer N from stdin (first line) and do work
sized by N. codecalc runs it at each size in sizes (comma-separated) and fits
the growth curve to estimate Big-O (O(1), O(log n), O(n), O(n log n), O(n^2)...).
Example python: 'import sys\nn=int(sys.stdin.readline()); s=0\nfor i in range(n): s+=i\nprint(s)'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| sizes | No | 100,1000,10000,100000 | |
| timeout | No | ||
| language | No | python3 |