Can we remove an element in a single linked list without
traversing?
Lets suppose the link list is like this
1 2 3 4 5 6
We need to remove 4 from this list (without traversing from
beginning) and the final link list shud be 1 2 3 5 6
only thing we know is the pointer to element "4". How can
we remove "4" and link "3" to "5"?
Answer Posted / pradeep
its possible only if it is a doubly linked list.
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.
What is namespace & why it is used in c++?
Why do we use classes in programming?
What is the role of C++ shorthand's?
Explain the benefits of proper inheritance.
What do you mean by enumerated data type?
Which function should be used to free the memory allocated by calloc()?
What is the difference between public, private, and protected access?
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.
Will rust take over c++?
What can c++ be used for?
Do you know what are static and dynamic type checking?
Which operations are permitted on pointers?
How many characters are recognized by ANSI C++?
How do you sort a sort function in c++ to sort in descending order?