yeah, i am geting it now i gues, then can i use high as a global var. suggest a workaround maybe?
Type: Posts; User: Samarth KV
yeah, i am geting it now i gues, then can i use high as a global var. suggest a workaround maybe?
@whiteflags: thank you atlast my soul can rest ... stupid coll teacher made one wrong assignment and now i had to go thru all this. the code was this:
mergesort(int a, int left, int right){...
i am not using string anymore, as some1 mentioned above it is getting harder. but then do u know any simple merge function..!?
@I MALC NO i need to get this, right is divide /2 and hence will be <=1. so while loop should not have a prob. thanks a lot for the help by the way
@i malc oh i really f*king missed that.
@soma sory man. i split the array and and push it into string while sorting it. then i o/p the string, simple right. write the prgram.. :D
@Tomas: sory man, ur right, i mised it.
33 22 1 55 11 5 6
33 22 1 | 55 11 5 6
33| 22 1| 55 11| 5 6
33| 22| 1| 55| 11| 5| 6
^ ^ ^ ^ ^ ^ ^
how to address or get these? tats y i...
@iMalc: hey if there is no while loop then how does it terminate?? how do u control the recursive function cal.. it keeps on quiting i think of infinite looping, but then how to fix tat?!? and wat it...
@salem: am casting coz i dont wnat the output to be ascii'd. like if u store char x=65 then it will print 'a' right!!?! so im trying to make the compiler treat it as a string. i dint know tat bout...
@Tomas am comparing 2 arrrays and pushing it into a string. tats merge. if b[i] is smaller, it goes first els c[i] goes first. assuming tat while h<=1 it would have split the array into 1 element...
buddy, i have learn much, but the point wen ur ready to try anything is this, i am trying quite a lot to make this ........ work coz at my ADA(analysis of design of algorithms) lab they gave a...
i hve to use global wats rong with tat?!? am trying to copy the number in the array into the string or character without the compiler mistaking it to be ASCII!?!
:( :( :(
i am trying hard to make my mergesort algorithm but at the moment, syntaxically it is correct, but while executing it stops at the split function. please chek this program, its the third...