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 data and data types?
Is selection sort greedy?
What do you mean by spanning tree?
What are dynamic data structures?
How can you insert a node at the end of linked list?
What is the difference between hashmap and linkedhashmap?
Why do we use different types of data structures?
Define a path in a tree?
What is a b+ tree? Explain its uses.
Write is a binary search tree? Write an algorithm and tell complexity?
What is array simple?
Define a full binary tree ?
What is circular queue example?
Explain recursive function & what is the data structures used to perform recursion?
What exactly is data?