Sharing a simple strategy to find out what testcases does your code fail on.
- 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: https://youtu.be/8wBu5wBDlWY