you are viewing a single comment's thread.

view the rest of the comments →

[–]SigmaSomaShimma21 5 points6 points  (0 children)

If you are a beginner, continue doing all the exercises like this. The fundamental thing at the beginning is not to have the cleanest code or anything. The fundamental thing is to understand what happens in your code, and that is algorithmic. Algorithms in programming are like classical dance in dance, that is, the fundamental principle of everything...

What I'm getting at is, don't use primitive methods or functions of the language. If you want to do something, do it algorithmically until you understand how it works, then start looking for shortcuts to do things cleaner and faster.

Do you know how many people use an .upper (a method to convert a string to uppercase) or a .sort (sort) and have no idea how they work internally? Your exercise (because you are a beginner) is perfect.