could you check if my logic is correct?
first i took in all the elements then i sorted the array.
with the sort function i passed a comparator function
which first converts the elements to string and then compares the string (in lexicographically order) and then returned back the value.
this will give us the highest possible numbers i think since in strings it is being compared in lexicographical order
then i printed the new sorted array