Question: Integer inputSize is read from input. Then, strings and integers are read and stored into string vector furnitureList and integer vector skuList, respectively. Lastly, integer
Integer inputSize is read from input. Then, strings and integers are read and stored into string vector furnitureList and integer vector skuList, respectively. Lastly, integer skuThreshold is read from input.
Initialize lastFound with
Find the last element pair with a sku greater than skuThreshold. If the element pair is found, assign lastFound with the index of the element pair and output the furniture and sku, separated by a space. End with a newline.
Ex: If the input is:
cradle cubby sofa desk
Then the output is:
sofa
Found at #
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
