call function recursively when it is the last node, return the function calls and print it
On Wed, Sep 28, 2011 at 8:20 AM, rahul sharma <[email protected]>wrote: > make sure that u ryt the syntax correct > > > On Wed, Sep 28, 2011 at 8:18 AM, rahul sharma <[email protected]>wrote: > >> reverse(head) >> { >> if(head==NUll) >> { >> printf("head->info"); >> return; >> } >> reverse(head->link) >> printf("head->info); >> } >> >> On Wed, Sep 28, 2011 at 4:39 AM, anand karthik < >> [email protected]> wrote: >> >>> Reverse it , print it and reverse it again. :-) >>> >>> On Wed, Sep 28, 2011 at 3:28 AM, Ankur Garg <[email protected]> >>> wrote: >>> > Print Reverse of linked list (dont reverse it) with only constant >>> space. >>> > >>> > Recursion uses stack spaceO(n) ..so post some other solution .. >>> > >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups >>> > "Algorithm Geeks" group. >>> > To post to this group, send email to [email protected]. >>> > To unsubscribe from this group, send email to >>> > [email protected]. >>> > For more options, visit this group at >>> > http://groups.google.com/group/algogeeks?hl=en. >>> > >>> >>> >>> >>> -- >>> Best, >>> T Anand Karthik, >>> >>> Contact number: +91-9571552652 >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >>> >> > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
