When the size of a program's input is increased by 2,
the runtime increases by 8. The program is:

A:O(n)

B:O(n log n)

C:O(n^{2})

D:O(n^{3})

E:O(2^{n})

Answer: D

When the input size increases by 2 and the time increases by x,
the Big O is O(n^{k}) where x = 2^{k}.
In this case, 8 = 2^{3}, so the program is
O(n^{3}).