sorting with first comes up in array

By | July 17, 2018
Questions:

I want to get an answer [‘H’,’H’,’A’,A]
from the input [‘H’,’A’,’H’,’A’]

basically sorting based from the char that comes up first.
could someone help me

Thanks

Answers:

Leave a Reply

Your email address will not be published. Required fields are marked *