Seg fault on submission


#1

What’s wrong with this code?

It’s working on all tests cases I thought of. But gave segmentation fault on submission and didn’t show the test case.