DEV Community

Paolo Ventura
Paolo Ventura

Posted on

100 algos in 100 days (Day 36)

23/10

Before anything I have to admit I failed quite badly at coding out the following question. Straight away I recognised it was dynamic programming but putting it into place was a bit more difficult and I definitely need more recursion practice.

For n steps how many combinations of steps can we use; given we can jump 1, 2 or 3 steps at once.

My main reflections

*Coding without vs code and prettier I encountered a return null error which stumped me for a while. Which means more checking through as I code
*As above manual formatting practice is important
*I took too long to visualize and sketch out the problem
*In this example my naive solution took quite some time to code out and test.. sometimes need to pivot faster.
*It was good that I could relate to other problems have seen and apply them. Even quickly recognising the type of question.
*However, directly applying a solution was a bad idea. Better to recode and do new variable names as might get lost

Top comments (0)