understanding the time and storage demands of difference data structures + algorithms


measuring the literal program runtime ⌛

we can add time in front of an executable command to measure the program run time

e.g. time ./file

we can add a file (usually .txt) to standard input (stdin) using the < character

e.g. ./sum < sum100numbers.txt

we can print output into a file (i.e., treat a file as stdout) using the > character

e.g. ./sort < random100.txt > sorted100.txt

after the program runs, time gives three readings (outputted to stderr)

generally, real time $\approx$ user time + sys time