AirBnb | PhoneScreen
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2022-05-02Added By Anonymous
Source: Link
Write a program to Print HasNext(), Next() and Remove() an element from list of list.
1[ [ ],[ 1, 2, 3], [ 4, 5], [ 6, 7 ], [ 8 ] ]
2
3HasNext() - True
4Next() - 1
5Remove() - 1Solved it using two queues. Rejected.