unmemoized - too slow
list memoization - still too slow
array memoization