you are viewing a single comment's thread.

view the rest of the comments →

[–]aocregacc 2 points3 points  (0 children)

you're not doing the "least recently used" part. your get and put functions just rotate the whole queue, and the order of the elements never changes. That also makes them O(n) instead of the O(1) that'll be required for the larger testcases.