Finding test case on which your code fails!

Sharing a simple strategy to find out what testcases does your code fail on.

requirements:

  1. A working brute force solution.
  2. An efficient solution with possible implementation bugs.
  3. 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

2 Likes