Sharing a simple strategy to find out what testcases does your code fail on.
requirements:
- A working brute force solution.
- An efficient solution with possible implementation bugs.
- A way to generate a random test case which is small enough for the brute force solution to execute on.
this video explains the idea behind stress-testing and gives template code for testing your solution: How to stress test your solution! Detecting the corner cases! - YouTube