SRL Archive - Java Help and Tutorials

MergeSort Implementation - Help!


Infantry001

2012-02-23 01:36:55

Hey guys,

I'm currently working on a homework assignment that deals with creating my own implementation of MergeSort (http://en.wikipedia.org/wiki/Merge_sort).

Unfortunately, my main sorting method [sort()] must return void, and so, I am sorting the array through reference calls.

And so… I'm lost. I can't get my code to work. I've been debugging, and I think it's got something to do with the arrays left and right not getting updated.

Can any one of you smart people figure out what I'm doing wrong? :)

http://pastebin.com/qNzg17Mp