Open
Description
Currently, we just get the DS size and rely on the single operator to iterate the entire DS.
But it will be inefficient if the operator cannot access the item in O(1) time.
This issue opens the window for performance optimization.
And the enhanced operators are listed below:
Vector:
next().
LinkedList:
next().
BinaryTree:
RedBlackTree:
inorder_successor().
inorder_predecessor().
preorder_successor().
preorder_predecessor().
postorder_successor().
postorder_predecesor().