Why ArrayList add() and add(int index, E) complexity is amortized constant time? Why not O(1) for add(), O(n) for add(int index, E)? [duplicate]

前端 未结 1 1175
我在风中等你
我在风中等你 2020-12-13 20:50
热议问题