Vector option in Java -


i using vector of object. issue removal vector expensive operation( o(n^2)). replacement of vector in java. in uses addition , removal extensively happens.

i c++ person don't know java

well, vector class shouldn't used. there many containers available in java. few of them:

arraylist random access, bad inserting or removing middle of list.

linkedlist bad random access, fair iterating , adding/removing elements middle of container.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -