You are designing a text editor with an undo/redo functionality. You want to store the history of operations efficiently, allowing the user to undo and redo actions in any order. Which data structure, built using deques, is best suited for this scenario?