Why does adding an element at the end of LinkedList take longer than an ArrayList?

前端 未结 0 793
一个人的身影
一个人的身影 2020-12-12 06:05

I learned that adding an element at the end of a LinkedList is O(1) since we\'re just adding linking an object to the last node of the list And ArrayList is also O(1), but w

相关标签:
回答
  • 消灭零回复
提交回复
热议问题