For the question of whether “shift” removes and “unshift” adds or vice versa, it doesn’t matter if it’s left or right shift. Yes, the bookshelf analogy doesn’t tell you at which end the removal or addition occurs. But as I said, I didn’t think this was the question being asked, and if it is being asked, then it can be answered with the index shifting and the comparison to push/pop.