please point out the mistake in my code, it shows error on submitting
Array form biggest number
Hi @sam15jain, problem with your code is :
- Sort function is incorrect. Some unnecessary operations are being performed.
- The swap function demands int but you are passing a character and array. The fact it is working here because it takes the ASCII value of the starting character of the strings/char arrays passed.
I recommend you to use the string and STL sort function for this question. It will ease your task of writing the code.
Hope this helps
1 Like