Let's imagine we have an array with all the 26 alphabet letters in random order. Now, what if I want a particular letter, like "M", to be the first in the list and then sort the rest of the alphabetically? How can this be achieved without having to splice and unshift "M" back into the list after sorting?
Is there a more efficient or cleaner way to accomplish this task other than modifying the array directly?
For example:
Unsorted: ['b','c','d','m','a']
Sorted: ['m','a','b','c','d']