Question: C++ Integer dataSize is read from input. Then, strings and integers are read and stored into string vector topicList and integer vector pageList, respectively. Lastly,
C++




Integer dataSize is read from input. Then, strings and integers are read and stored into string vector topicList and integer vector pageList, respectively. Lastly, string topicAsked and integer pageAsked are read from input. - Assign matchesFound with the number of element pairs that match both topicAsked and pageAsked. - For each pair that matches topicAsked and pageAsked, output "Exact match found at index " followed by the element pair's index. End with a newline. Ex: If the input is: 3 Energy 173 Medicine 182 Energy 175 Energy 173 Then the output is: Exact match found at index 0 Total: 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
