init commit
Merge branch 'master' of https://github.com/michaelpace/sf-problem1
first solution; cache iterated items. requires o(n) extra space, but same time complexity