Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Data Structures -- Linked List -- Reverse


12 replies to this topic

#11 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 30 December 2009 - 05:24 PM

linked listData Structures -- Linked List -- Reverse

I need to show a full program of each linked list

I.E 1.Singly linked list

  2.Doubly linked list

  3. Circular  linked list

  4. Circular doubly linked list

-reply by sintay

 



#12 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 19 February 2010 - 12:49 AM

Data Structures -- Linked List -- Reverse - Reverse a linked listData Structures -- Linked List -- Reverse

//The right solution...typedef struct elementT{ Int value; Struct elementT *next; }element;void reverse(element **head) { element *current=*head,*result=NULL,*temp=NULL; while(current!=NULL) { temp=current->next; current->next=result; result=current; current=temp; } *head=result; }



#13 Guest_Bragaadeesh_*

  • Guests

Posted 12 September 2010 - 03:20 PM

Here is my two cents

Program to reverse a singly list ITERATIVELY,

http://www.technical...gly-linked.html

Program to reverse a linked list RECURSIVELY

http://www.technical...ecursively.html




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users