Search:

Type: Posts; User: helloworld922

Search: Search took 0.30 seconds.

  1. Re: is there a better way to extend an array?

    Extending an array could be more efficient, but unfortunately due to the nature of modern computer's memory management, it's not possible.

    Yeah you do have some wasted space, but consider this:
    ...
  2. Re: is there a better way to extend an array?

    Try using the ArrayList class. It still "extends" arrays by copying the array, but it's considered O(1) average because it doesn't extend it 1 element ad a time (rather, I believe it doubles it's...
Results 1 to 2 of 2