Algorithmic Challenges: Be creative or fix code following algorithm challeges guides?

Hello, I would like to ask you one questions that was always interesting to me. It is related to algorithmic scripting challenges.

When solving algorithmic scripting challenges I usually come up with different ideas than the guides provide.

The code usually gets longer than in guides of basic, intermediate or advanced solutions. I use many for loops and if statements instead of build in javascript methods. Should I fix this? How does this affect the performance of the apps. Should I be concerned with this? Or it is good as long if it works?

Thank you very much!

When you get a better grasp of the language, try re-factoring your solutions. This is a practice that happens often in software development.

If you want more practice with algorithms try

agree. it will come to you. with time. also, try to pair-program. so you can see other ways to get to the same result.

How does shorter, lesser loops code affect the performance?