Despite writing the same solution on my own and using this solution too., the compiler kept throwing errors. I tried the same solution in another IDE and the code worked perfectly. I couldn’t find a place to report so I am commenting here. Do look into it. Lost my points because of this.
My code with error:
Please guide me if there is a mistake in the code or else let me re-take the problem( or some way to let me earn my points).