You have an array of businesses. Each business has an ID
and a rating
You want to output the business ids sorted by rating (highest to lowest), with businesses with the same rating respecting the order above.
which runs in in O(n) time and outputs