You're given a sum of numbers written as a string like "3+2+1". The numbers are single digits separated by plus signs. Your task: rearrange the numbers in non-decreasing order while keeping the plus signs in place.
For example, "3+2+1" becomes "1+2+3". This tests your ability to extract data from a string, sort it, and rebuild the output. The STL makes this simple. Before reading on, think: how would you separate the numbers from the plus signs? What data structure would you use to store them?