Search:

Type: Posts; User: Ephraim

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    8,105

    ve a look here QuickSort...

    ve a look here
    QuickSort
  2. Thread: Linked list

    by Ephraim
    Replies
    9
    Views
    3,330

    F*** forget all what i sad :( it is also working...

    F*** forget all what i sad :(
    it is also working like your first post....
    what is wrong with me today?!

    Ciao Ephraim
  3. Thread: Linked list

    by Ephraim
    Replies
    9
    Views
    3,330

    Ok i was wrong with the const (to fast replied :(...

    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...
  4. Thread: Linked list

    by Ephraim
    Replies
    9
    Views
    3,330

    Why ?? I thought structs are also available in...

    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...
  5. Thread: Linked list

    by Ephraim
    Replies
    9
    Views
    3,330

    In the first call of AddNode you will loose the...

    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...
  6. Thread: recursion

    by Ephraim
    Replies
    7
    Views
    1,081

    jep you are right :) Forgotten this point. :(...

    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
  7. Thread: recursion

    by Ephraim
    Replies
    7
    Views
    1,081

    Tricky :) but for what reason do you have the ...

    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...
  8. Thread: recursion

    by Ephraim
    Replies
    7
    Views
    1,081

    first call: funt1(4) Inside there: ...

    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...
Results 1 to 8 of 8