writing code to pass all test cases in as minimum resubmissions as possible

Does anyone have any tips or tricks that help with writing code, so that the code passes all of the test cases in as minimum resubmissions as possible?

I try all of the example test cases, and account for any edge cases like, no input etc etc.
I get caught out on the most obscure test cases. Then adjust the code, then get caught on another obscure test case, that if it had not come up, would have never have thought about.

Comments (1)