Data Structure Algorithms Interview Questions And Answers - FAQ
Monday, April 14, 2008
Insert element at head position into Linked List..
void AddAtHead (NODE **head, int i) {
NODE * newNode =(NODE *)malloc(sizeof(NODE));
newNode->data = i;
newNode->next = *head;
*head = newNode;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment