mardi 28 janvier 2020

Finding Edge Cases and Exceptions

While solving medium/hard problems on competitive programming sites, I tend not to have a problem with the logic and my code, more often than not, does well with the same input. However, my code often passes only some test cases. This is because, I tend to ignore the exceptions i.e. the few cases where my code doesn't work. As I can't access the expected o/p, I'm not able to look where it's going wrong. How to get better at finding such edge cases and exceptions, and make my code immune to them?

I understand this might go away as I keep coding, but am looking for ways to learn it faster and better. I use C++, if that helps.

Aucun commentaire:

Enregistrer un commentaire