I want to create a list of bytes. (In Java) The size is known. After every iteration, I'd like to remove the first element. And at any point in time, I will only be accessing the first element.
I thought about using a queue but that will not work in my use case as I need to keep the item in the list for multiple iterations.
What will be best suited keeping the performance in mind.
Array list of LinkedList? (Order is important) Since size is not changing, how about using array and accessing i-th element? Without removing the first everytime?