Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Algorithm (Data Structure) Worst-case cost in terms of N Average-cast.docx

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige

Hier ansehen

1 von 2 Anzeige

Algorithm (Data Structure) Worst-case cost in terms of N Average-cast.docx

Herunterladen, um offline zu lesen

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)
.

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)
.

Anzeige
Anzeige

Weitere Verwandte Inhalte

Weitere von wviola (20)

Aktuellste (20)

Anzeige

Algorithm (Data Structure) Worst-case cost in terms of N Average-cast.docx

  1. 1. 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)

×