Algorithm (Data Structure) Worst-case cost in terms of N Average-cast cost in term of N Efficiently (after N random inserts) support ordered operations (Yes/No) (afer N inserts) Insert Search Insert Sequential search (unordered list) Binary search (ordered array) Binary Search Tree Balanced tree (RB tree) Solution Algorithm worst-case cost average-case cost efficiently (data structure) (after N inserts) (after N random inserts) supported ordered Search insert search hit insert operation? Sequential search N N N/2 N no (unordered linked list) Binary search lgN 2N lgN N yes (ordered array) Binary tree search N N 1.39lgN 1.39lgN yes (BST) Balanced tree N 1.00lgN 1.00lgN 1.00lgN yes (RB tree) .