+ 1

Dynamic array

Can someone explain to me what is the difference between array size and array capacity? Thanks

16th Jan 2020, 2:20 AM
VuthinaRoeun
2 ответов
+ 4
Instead of allocating a new element one at a time as the array grows. They allocate a group of them. Capacity is how many have been allocated. Size is how many are used.
16th Jan 2020, 2:34 AM
John Wells
John Wells - avatar
+ 1
thank you sir
16th Jan 2020, 8:05 PM
VuthinaRoeun