Question: Integer inputSize is read from input. Then, strings and integers are read and stored into string vector itemList and integer vector numberList, respectively. Lastly, integer
Integer inputSize is read from input. Then, strings and integers are read and stored into string vector itemList and integer vector numberList, respectively. Lastly, integer numberThreshold is read from input.
Initialize lastFound with
Find the last element pair with a number greater than or equal to numberThreshold. If the element pair is found, assign lastFound with the index of the element pair and output the item and number, separated by a space. End with a newline.
Ex: If the input is:
shoerack chair desk
Then the output is:
desk
Match found at # C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
