We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I understand that first you solved by only recursion and then added memoization to your solution. When memoization is used the recorded values are not calculated again and again as in pure recursive solution so it is faster.
Still I am not sure if you really asked this or probably you figured it out later..
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #169: Exploring the number of different ways a number can be expressed as a sum of powers of 2.
You are viewing a single comment's thread. Return to all comments →
I understand that first you solved by only recursion and then added memoization to your solution. When memoization is used the recorded values are not calculated again and again as in pure recursive solution so it is faster.
Still I am not sure if you really asked this or probably you figured it out later..