Data Structures and Algorithms Flashcards
What is “asymptotic amortized worst case analysis”
TBD
Insert time of Unsorted List
O(n)
Delete time of Unsorted List
O(n)
Get value at Index of Unsorted List
O(1)
Search Value for Unsorted List
O(n)
Find Max/Min in Unsorted List
O(n)
Space usage of Unsorted List
O(n)
Insert time of Sorted List
O(n)
Delete time of Sorted List
O(n)
Get value at Index Sorted List
O(1)
Search Value for Sorted List
O(log n)
Find Max/Min in Sorted List
O(1)
Space usage of Sorted List
O(n)
Insert into Unsorted Linked List
O(1) if the pointer to the next location is available. O(n) otherwise
Delete from Unsorted Linked List
O(1) if the pointer to the next location is available. O(n) otherwise
Get value at index in Unsorted Linked List
O(n)
Search for value in Unsorted Linked List
O(n)
Find Max/Min in Unsorted Linked List
O(n)
Space usage of Unsorted Linked List
O(n)
Insert into Sorted Linked List
O(1) if the pointer to the next location is available. O(n) otherwise
Delete from Sorted Linked List
O(1) if the pointer to the next location is available. O(n) otherwise
Get value at index for Sorted Linked List
O(n)
Search for value in Sorted Linked List
O(n)
Find Max/Min in sorted Linked List
O(n)