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
Post a Comment