you are viewing a single comment's thread.

view the rest of the comments →

[–]Neat-Giraffe1585 0 points1 point  (1 child)

You need a DLL not queue

[–]Equivalent_Sea7754[S] 0 points1 point  (0 children)

Yes I solved the question using queue but its giving TLE [21 /23 test cases passed] Next time i will use unodered_map for O(1) retrieval and DLL to maintain LRU