interesting question because of the diversity of solutions showing time/space trade off.