Write a program to reverse a linked list?
Answer Posted / jithin
reverse(Node * previous, Node * Current)
{
start = current;
if(current !=null)
{
reverse(current, current->next);
current->next = previous;
}
}
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is pure virtual function?
Differences between private, protected and public and give examples.
Write about the various sections of the executable image?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
Why iomanip is used in c++?
Write a code/algo to find the frequency of each element in an array?
Which function cannot be overloaded c++?
How can we read/write Structures from/to data files?
How do you add an element to a set in c++?
What is ctime c++?
Why do we use double in c++?
What is the difference between method overloading and method overriding in c++?
A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.
Explain queue. How it can be implemented?
Is c# written in c++?