Question: Name: (30 points) Given a C++ vector, return the 21 vector is at least 2. Example: Input: {5, 2, 1,9,3 }, Output: 5 Input: {9,7},
Name: (30 points) Given a C++ vector, return the 21 vector is at least 2. Example: Input: {5, 2, 1,9,3 }, Output: 5 Input: {9,7}, Output: 7 in the 2nd largest number in the vector. The size of int SecondLargest(const vector int>& V)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
