java Class Vector# CS - 计算机科学
x*o
1 楼
Hi.I just feel interesting on the underlying implmentation of the vector
class. Anyone knows some detail on these stuffs? Thanks! Appreciate!
For the vector, it is a growable array,
1. it can support dynamic insert and delete
2. it can be accessed by index
So I just wonder how they implement it?
(Just my guess) the vector is still actually an contiguous array, and when
insert and delete, just create a new modified copy of the array.?
I am interested in this, because my code is based on the vecto
class. Anyone knows some detail on these stuffs? Thanks! Appreciate!
For the vector, it is a growable array,
1. it can support dynamic insert and delete
2. it can be accessed by index
So I just wonder how they implement it?
(Just my guess) the vector is still actually an contiguous array, and when
insert and delete, just create a new modified copy of the array.?
I am interested in this, because my code is based on the vecto