Question: C++ Input strings into a vector. Input stops on the string: END The input could result in an empty vector. Swap the vector element with
C++
Input strings into a vector. Input stops on the string: END The input could result in an empty vector. Swap the vector element with the minimum value with the element with the maximal length. If an element of minimum value occurs more than once, swap with the one that occurs last. If an element of maximum length occurs more than once, swap with the one that occurs first. Use only one loop for finding appropriate strings to swap. Output the original vector followed by the modified vector. If the vector is empty, output "Empty vector.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
