yesbutno1685's blog

By yesbutno1685, history, 4 years ago, In English

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

  • Vote: I like it
  • +1
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +4 Vote: I do not like it

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

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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.