Not able to add no. of test cases and remove duplicate elements
Hi
I have corrected your code. The problem was the way in which you were building list.
Also just an advice, Please take the input in main itself. Here also n,m should be in the main, then after that you can build list in a separate function to reduce chaos and unexpected outputs.
For the timing, I have shifted your build list function in main. You can do that the way you were doing but take input in main only!