Блог пользователя yesbutno1685

Автор yesbutno1685, история, 4 года назад, По-английски

Hello everyone!

I often find it very frustrating when there is one testcase that gets a wrong answer and you have no idea why. Is there a strategy among coders as to how to deal with edge cases?

Thanks in advance

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

trying to make small test cases and solving them manually works for me most of the time.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Actually there isn't. Firstly if your solution has a lot of edge cases, then you should probably look for some better solution, because the correct ones mostly don't have many edge cases.

Secondly, you should emphasize on thinking the solution thoroughly, before implementing. This is a good practise and will save you a lot of time later.

Thirdly, once you solve a lot of problems, the bugs and edge cases are mostly similar. You'll eventually become good at identifying them.