0
If you mean cpp and stl, then vector is a container. Works like a dynamic array. Has contiguous memory inside itself and as a result fast item access by index. For optimization you can use reserve (), shrink_to_fit () and fast zeroing. https://code.sololearn.com/c5qOlJ0htER6/?ref=app
7th Jul 2017, 4:25 AM
soman