Domanda di colloquio di Airbnb

Given an array of arrays, implement an iterator class to allow the client to traverse and remove elements in the array list. This iterator should provide three public class member functions: hasNext(), next(), and remove().

Risposta di colloquio

Anonimo

26 set 2017

I tried to use a queue and a stack together, which didn't work. The correct answer was using 2 pointers with a linked-list.