I have made a script by which you can find testcases where your code fails. To run script, you need to give 4 paramters:
- Generator code. Code which generates random testcases.
- Correct code. This brute force code which will always give correct results.
- Wrong code. This is code with better complexity but is giving wrong answers.
- Number of test cases. Enter how many testcases you want to genrate where your correct code and wrong code gives different results.
You can find script and other details here.
Note : This script is made for C++ but you can make it run for other languages by making desired changes in line 5 to 12.