memoization related 3 questions