with all due respect, if it did, i wouldn’t be asking here, but i guess I will try something, but thanks for the above help
Some people don’t read, and I had no idea whether you did or not. That’s why I gave that piece of advice.
If you want, you may send me your code in private message and I’ll see if I can give any other hints.
I read about memoization, and i know it will make the code faster, but the problem is that the output i am getting is wrong even though the above tests worked correctly. I just woke up and will look at the problem.
I am not sending the code in private because once i did and they just gave me the answer, which i hate not a fan of spoon feeding, lol
edit: never mind, I just solved the entire problem and didn’t even need memoization, lol
I am genuinely grateful for your help, didn’t mean to offend you if that happened.
Also, how do i automatically share my code in the community (from the menubar where i see other’s code)?? I did it once but not sure how it happened
Good job in solving the puzzle!
I almost never give answers. I usually give custom cases, or maybe hints.
You can set to auto publish solutions on the SETTINGS page.
C++ version:
In my solution I chose standard C array instead of vector to pass 13-th test.
And don’t forget SUB $3 $3 special case.
just you do a loop N times on your coding. You don’t need memorized
2 methods for test8 and above,
1°) just do a loop N times on your coding. it’s an easy puzzle.
2°)if you want do a recursion just kept that the value is now valid for not repeat your recursion
Only able to solve up to 12 case out of 13. The last case Deep Birecursion gives me timeout.