Developing the test cases

How to derive test cases for problems like this

Can anyone derive possible test cases for this problem, I am getting wrong answer for its solution, my code is working fine with all the test cases, which I have developed.

This tool might come in handy.

You can generate random arrays,strings and even graphs there .

For questions like this you can generate the graphs randomly but I think since the queries are complex(two kinds of queries ) , you would need to generate those yourselves .

1 Like