program to Reverse a linked list
Answer Posted / mbm
/* Reverse linked list by recursion */
if(head)
head = _ReverseLinkedList(NULL, head, head->next);
NodeStr *_ReverseLinkedList(
NodeStr *preNode,
NodeStr *node1,
NodeStr *node2
)
{
NodeStr *next_node;
if(!node2)
return node1;
next_node = node2->next;
node2->next = node1;
node1->next = preNode;
return _ReverseLinkedList(node1, node2, next_node);
}
Is This Answer Correct ? | 11 Yes | 11 No |
Post New Answer View All Answers
how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
Write a program to model an exploding firecracker in the xy plane using a particle system
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
Cluster head selection in Wireless Sensor Network using C programming language.
Develop a routine to reflect an object about an arbitrarily selected plane
#include
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??
What is full form of PEPSI
Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?
why nlogn is the lower limit of any sort algorithm?
write a simple calculator c program to perform addition, subtraction, mul and div.