My output is coming correct but the test cases are not passing please tell why

hello @vibhor1007
remove that sort function(given data is already sorted) and then try