Search:

Type: Posts; User: helloworld922

Search: Search took 0.10 seconds.

  1. Replies
    36
    Views
    4,302

    [SOLVED] Re: Sorting and Merging

    As I'm using it, there's no difference. The reasons are mostly historical :P (in some other languages there were performance advantages to doing ++variable, though in Java I don't believe there is...
  2. Replies
    36
    Views
    4,302

    [SOLVED] Re: Sorting and Merging

    Hmm, are you sorting in ascending order or descending order? Though I guess that doesn't really matter.

    The only thing I can see that's wrong is this section:

    else if (curr < A.length)
    {
    ...
  3. Replies
    36
    Views
    4,302

    [SOLVED] Re: Sorting and Merging

    Arrays are passed via reference rather than by value, so any changes you make to the object inside another method will be reflected in the original array. This is why your professor had you declare...
  4. Replies
    36
    Views
    4,302

    [SOLVED] Re: Sorting and Merging

    I think you started getting mixed up a bit here (lack of sleep perhaps?).
Results 1 to 4 of 4