Current Forum: Homework 2 Forum |
Date: Sun Sep 23 2001 8:39 pm |
Author: Chow, Jicai Jonathan <jchow@andrew.cmu.edu> |
Subject: Re: Vector(0,1) or Vector(max,0) ?? |
|
|
I did experiment with it and found that Vector(100,100)is significantly faster than Vector(0,1). I suppose the rate at which the Vector increases its capacity is more significant.
And strangely, using one for loop did not really make a differnce.
Even stranger, I have a friend who used a nested for loop AND one more for loop, and still have a program that runs just as fast as the solution.
|
|