Current Forum: Homework 2 Forum |
Date: Mon Sep 24 2001 9:23 am |
Author: Lee, Peter <petel@cmu.edu> |
Subject: Re: Vector(0,1) or Vector(max,0) ?? |
|
|
This is a good question. Indeed, increasing the size of a vector causes Java to make a complete copy of all of the vector's elements. So, if you do this every time around the look, you will create an O(n^2) overhead on your program. |
|