I assume the first number is the capacity, but what is that array supposed to be?
@Meteo It took me quite a while to figure out how to read this array. Here is how you do it:
- Read the next number in the array.
- If it is a zero, call LRUCache.set(). The following 2 integers in the array are the arguments to set().
- If it is a one, call LRUCache.get(). The following 1 integer in the array is the argument to get().
- Repeat until the whole array is scanned.
So in your example: