I just have a question about this part of code
Can you pls explain the order of actions here? if remove(0) is performed first, how then add method knows what was in in the 0? It's basically self-explanatory, however, I didn't know we can add to the list and element which we are removing. Please provide some details. Thanks.