I need a data structure queue, linked list of hash map or stack, to be able to save last 10 objects of user data, and if user try to add item number 11 it should delete item number 0, and make sure the list is only have the last 10 items.
Is there any library or algorithm to achieve that or I have to implement the algorithm by myself?