Загрузка страницы

What is Amortized Time Complexity? - Dynamic Array

Amortized time complexity analysis for an algorithm involves taking to total cost of operations in the algorithm over an extended period of time.
Amortized cost is useful when the cost of operations in an algorithm vary as per the state of the underlying data structure or time. In these cases, the average cost over an extended period of time is usually lesser than worst case operation cost.

We take the example of a dynamic array, in which the size of the array is doubled on overflow, and elements are inserted N times. We come to the conclusion that the overall time complexity should be O(N) amortized.

Link to code:
https://youtu.be/EOjoQxdOBgU

References:
http://www.cs.cmu.edu/afs/cs/academic/class/15451-s15/LectureNotes/lecture06/growing-shrinking-table.txt
http://www.cs.cornell.edu/courses/cs3110/2011sp/Lectures/lec20-amortized/amortized.htm
https://anh.cs.luc.edu/363/notes/06A_Amortizing.html

Time complexity explanation:
https://youtu.be/fZc3ijGM0aM
Log explanation:
https://youtu.be/Xe9aq1WLpjU

Видео What is Amortized Time Complexity? - Dynamic Array канала Gaurav Sen
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
21 февраля 2018 г. 11:00:05
00:11:51
Другие видео канала
Яндекс.Метрика