Marco is right that set(index, element) does not increase the capacity of an ArrayList and so is definitely O(1). William extends the answer to add, ...
確定! 回上一頁