Discussion Board
Go to the previous messageThere are no next messages
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.
Post response

Go to the previous messageThere are no next messages
Current Thread Detail:
Speed      Tomes, Justin Daniel      Sun Sep 23 2001 12:20 pm       
Re: Speed      Agarwal, Aditya      Sun Sep 23 2001 5:05 pm       
Re: Speed      Lee, Charles C.      Sun Sep 23 2001 6:28 pm       
Vector(0,1) or Vector(max,0) ??      Tomes, Justin Daniel      Sun Sep 23 2001 7:08 pm       
Re: Vector(0,1) or Vector(...      Chow, Jicai Jonathan      Sun Sep 23 2001 8:39 pm       
Re: Vector(0,1) or Vector(...      Lee, Peter      Mon Sep 24 2001 9:23 am       

Back to previous screen