PDA

View Full Version : MergeSort Implementation - Help!



Infantry001
02-23-2012, 06:36 AM
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