The Magical Pocket

# Introduction In this challenge, we will design a class called "Pocket" that simulates a magical pocket like Doraemon's. The pocket has a maximum capacity and automatically removes the least recently used item when it is full. The goal is to implement the logic to retrieve and add items to the pocket based on a nickname identifier. We will test the functionality by adding and retrieving items and ensuring that the correct items are left in the pocket.

|60 : 00

Click the virtual machine below to start practicing