Just Google the problem... In fact, the interviewers asked me if I had ever implemented this problem, and they were ready to switch to another one if I had answered yes. I used a Hashmap in the solution and wish I had had more of the API calls for these at the ready. Practice probably helps too.
In C++, you can use a dynamic array with varying number of hash entries per row. The hash can be found by taking the modulo of the key. If a collision occurs, you can use linear probing by taking the modulo of (key + 1).
Linked lists - objects with pointers to the next or previous object. Used mostly for sequential accesses. Array - a built in list accessed by an index. Better for random access. stack can be a FIFO queue, put two of the back to back. If the queue is a LIFO then it is a stack.
I think the key in generic questions like this is to be careful to cover the fundamentals, and to be familiar with all the followups so you're prepared for whatever they throw at you. Maybe do a mock interview with a Qualcomm Test Engineer expert on PrepTick to get a real-world answer? They give lots of guidance and pro tips on how to deal with this kind of stuff. https://www.preptick.com/practice-interviews
We spent about half an hour building a data model for the text editor. We started out very simple, using two arrays to represent the text before and after the cursor, and discussed our way to a combination of linked lists and arrays. After that was finished, we discussed how to build in simple bold/italic/underline formatting.
Listed my experiences working with data collection, databases, research, etc. but since there is a specific area now "data warehousing" it was apparent that using transferable skills was not part of the solution.