ve a look here
QuickSort
Type: Posts; User: Ephraim
ve a look here
QuickSort
F*** forget all what i sad :(
it is also working like your first post....
what is wrong with me today?!
Ciao Ephraim
Ok i was wrong with the const (to fast replied :( )
but you must make a copy of the pointer else
it is gone if you make this
node = node->next
By the way without the const it is working...
Why ?? I thought structs are also available in C!!??
Or what problem do you have with this code?
Ohh jep new, cout and using namespace bla are c++, but the main thing
is the linked list and...
In the first call of AddNode you will loose the pointer
to your root.
You should use a const Node in AddNode param
and make a copy of it.
and then iterate until the end.
void...
jep you are right :)
Forgotten this point. :(
and with the negative thing ...
I think you can just use an unsigned int as exp isn't it?!
Ciao Ephraim
Tricky :) but for what reason do you have the
if(exp == 0) there. You will never go into this section ;)
If Exp == 1 it not calls again the power but returns num.
and so the exp isn't subtracted...
first call:
funt1(4)
Inside there:
funt1(4) calls -> funt1(4-1) calls -> funt1(3-1) calls -> funt1(2-1) calls -> funt1(1-1)
now we are at the special point with n == 0 (remember your if(n...