Algorithmic is not a trivial skill. You have to understand clearly the problem and be able to reformulate (which you've done well here). Then you need to know the vocabulary that will help you. Codewar is an excellent resource to polish that skill. I liked edabit.com for this also.
Algorithmic is not a trivial skill. You have to understand clearly the problem and be able to reformulate (which you've done well here). Then you need to know the vocabulary that will help you. Codewar is an excellent resource to polish that skill. I liked edabit.com for this also.
The refactored code is actually the solution in codewars! 😅, I'll check out edabit, thanks!!