Need help solving this problem in c++| Google interview| entry level position
Anonymous User
304

Need help in solving this problem in c++. Do let me know your approach and code in the comment section.
Receive a series of String and Integer inputs. Whenever a String input is received, store the input and when an integer input is received, print the string input that was received at the input attempt equal to the integer value.
Eg: Input “ABC”, “XYZ”, “MNO”, 2, “JKL”, “DFG”, “CVB”, 5
On the input of 2 “XYZ” is expected to be printed.
On the input of 5 “DFG” is expected to be printed.

Comments (4)