Question: Write a function BiasedSort that accepts a vector by reference and sorts the vector lexicographically, except that if the vector contains the string Me First,

Write a function BiasedSort that accepts a vector by reference and sorts the vector lexicographically, except that if the vector contains the string Me First, that string is always at the front of the sorted list. This may seem like a silly problem, but can come up in some circumstances. For example, if you have a list of songs in a music library, you might want songs with the title Untitled to always appear at the top.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!