Amortized complexity in layman's terms?

后端 未结 6 1433
南笙
南笙 2020-12-02 06:56

Can someone explain amortized complexity in layman\'s terms? I\'ve been having a hard time finding a precise definition online and I don\'t know how it entirely relates to

6条回答
  •  隐瞒了意图╮
    2020-12-02 07:40

    It is somewhat similar to multiplying worst case complexity of different branches in an algorithm with the probability of executing that branch, and adding the results. So if some branch is very unlikely to be taken, it contributes less to the complexity.

提交回复
热议问题