| joseplusplus (57) | |||||||
|
Hello there ! I'm following an algorithms course, and as you know, a primordial algorithm is Merge-Sort; I tried to implement it following the famous CLRS book pseudo code; The Merge Step, I've managed to get to work quite well...
But the MergeSort itself, the one that uses recursion heavily and calls the Merge-Step at the End, is a different Story; I don't know why it doesn't work..
As it is, it's giving me a: "Segmentation fault: 11" error, when I call it like this...
Can you please help me out, I really have NO Idea what's wrong. I've spent several hours trying to fix it with my limited knowledge. Best Regards, J. | |||||||
|
|
|||||||
| ne555 (4385) | |
|
Debugger, backtrace. ¿why do you return things that you are never going to use? | |
|
Last edited on
|
|
| joseplusplus (57) | |
|
Hello, Could you please explain to me, where is it that I'm returning things that I'm not using? I'm really clueless about the problem, so.. any further explanations would be really helpful, Thanks for your reply, sir, Sincerely | |
|
|
|
| cire (2362) | ||
Two things are obvious. mergesort is supposed to return a value. It does not. merge returns a value, but it is always discarded. | ||
|
|
||