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

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

#1

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!


#2

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 https://www.codewars.com


#3

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.


#4

How does shorter, lesser loops code affect the performance?