Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mergesort C program using recursion

 
srinivas suri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/* I am not getting the output in a sorted order. Can someone help me where the bug is?? i guess it's somewhere in merge( ) .....but, i'm not able to figure it out..... THANKS a ton








 
srinivas suri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for(i=low;i<high;i++) //k will contain no.of elements in p
a[i]=p[i-low]; // //p[0] is copied to a[low] and so on..........
free(p);

i tried this one also....still, it doesn't work!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic