create an singly linked lists and reverse the lists by
interchanging the links and not the data?
Answer Posted / sanjay rajput
struct node
{
int val;
struct node *next;
};
typedef struct node NODE;
NODE *p,*start;
p=start->next;
while(p!=NULL)
{
p->next=start;
start=p;
p=p->next;
}
| Is This Answer Correct ? | 1 Yes | 10 No |
Post New Answer View All Answers
What is the slowest sorting algorithm?
How to search binary in a sorted array?
For addition and deletion. Which one is most preferred: array list or linked list?
Which searching algorithm is best?
Which data structure is used in arraylist?
How do you use the sort function?
Can a tree be empty?
What is a node in it?
Which interfaces are implemented by abstractsequentiallist?
How would you use bsearch() function to search a name stored in array of pointers to string?
What is data structures in computer science?
Is array faster than arraylist?
What is difference between hashmap and map?
Are data structures important?
What is the easiest sorting method to use in data structures?