Need to know where is my code failing
Solution is present at the following location
Need to know where is my code failing
Solution is present at the following location
Each output should be on the new line…
You missed to print a new line after the output.
Suggestion:
(1) there is inbuilt sort function available in c++ which you can use instead of writing the whole function