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.
It's not all of the values leading up to six, so 24, 42, 6, 15, 51, 114, 141, and 411 are not valid. You can only use the digits 1,2,3 to form the number 6. I am not going to list out all of the combinations, but if you do it by hand, you will find that there are only 24.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Recursion: Davis' Staircase
You are viewing a single comment's thread. Return to all comments →
It's not all of the values leading up to six, so 24, 42, 6, 15, 51, 114, 141, and 411 are not valid. You can only use the digits 1,2,3 to form the number 6. I am not going to list out all of the combinations, but if you do it by hand, you will find that there are only 24.