Algorithm.txt: Update the addItem function signature