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
Give a basic algorithm for searching a binary search tree?
What are lists?
Explain binary representation?
What is impact of signed numbers on the memory?
What is sort order?
Is quicksort a stable algorithm?
What is the difference between a stack and an array?
What do you mean by the term “percolate up”?
What are the advantages of sorting and filtering data?
Describe the types of data structures?
What is an ordered list?
Which is faster binary or linear search?
If you do not initialize an array what will happen?
What is an iterative algorithm?
Why it is important to have aligned addresses? What is the exception generated when there is a misaligned address?