How Far To Take Solutions

Hello Campers,

I was wondering how far to go with solutions to some of the algorithm questions.
For example, the factorial question.

My answer satisfied the challenge but I could add to the code so that it catches input errors like entering a character instead of a number. How far are some of you taking your solutions?

Don’t worry about edge cases. I would encourage you to do the bare minimum required to pass the tests and then move on. Later, you can study algorithms more formally and then you’ll learn all sorts of tricks, techniques, and strategies for making them robust and fast.

2 Likes

I dunno. I tend to think that tinkering and chasing rabbits is one of the best ways to really learn how this works. There’s definitely no need to spend a lot of time on each challenge considering edge cases and validating your assumptions, but as long as thinking about those things is presenting an interesting challenge to you, go for it.