my algo is memoized nowgit add . :D