This was a question in one my friend\'s programming class.
Q. How do you sort an array of ints and then arrange them such that all dupl
int
a modified merge sort could do the trick: on the last merge pass keep track of the last number you pushed on the front of result array and if the lowest of the next numbers is equal add to the end instead of front