Shortcut for chapter specific information

Wednesday, May 4, 2011

Merge sort 3 (C)

Merge Sort 3 : Failed. 
Cause: I have read Prof. Shene's source code before I implemented.  There are two major issues when I implemente it.

1, the index should be inclusive, so most of my checkings was wrong. 
2, just like the perl version.  The C version doesn't increase the index correctly. 

There are other issues:
1, In C, one needs to dereference the address before pass to function such as memmove. 
2, I got the whole assignment code wrong in merging. 

With some debugging, of course this kind of issues can be easily identified and resolved.  But it means I am not yet good enough in this move.

No comments:

Post a Comment