EBK DATA STRUCTURES AND ALGORITHMS IN C
4th Edition
ISBN: 9781285415017
Author: DROZDEK
Publisher: YUZU
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 3, Problem 20E
Program Plan Intro
Techniques for rearranging nodes in the List:
- While ordering the records in the self-organizing list, normally the access probabilities of the records aren’t well known before.
- This issue led the researchers to develop several heuristics to estimate optimal behaviour.
- Some basic approaches used for reordering the records in the self-organizing list are given below.
- Move–to–front method (MFT)
- Transpose method.
- Count method.
- Ordering method.
Move–to–front method (MFT):
- After the required record is sited, keep that at the head of the list.
Transpose method:
- After the required record is sited, interchange that with its precursor.
Count method:
- Ordering the self-organizing list by number of times the records are being processed.
Ordering method:
- Ordering the self-organizing list by using definite criteria for information under analysis.
Explanation of Solution
(b) Cases in which the methods need an exhaustive search of the lists for every search:
- A list “L” is searched exhaustively by the move to front method while searching for its last record. This needs the data to be composed in the same sequences of records as in the list “L”, however in the reverse order. For instance, if the list
L = (p x r y) then the data sequence has to be (y r x p y r x p y r x p y…)...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Given a scenario where you need to efficiently insert elements at the beginning of a list, which type of linked list would be most suitable? Explain why.
Write the code to delete a node in the middle of a list implemented as a linked list with the dummy node (see Exercise 3). Compare your answer with the answer to Exercise 3. Are they the same? What do you conclude? Does the dummy node simplify the operation on the list? How?
What is the difference between a singly-linked list and a doubly-linked list?
In what situation would you use a singly-linked list over a doubly-linked list?
In what situation would you use a doubly-linked list over a singly-linked list?
If a node is in a linked list with N nodes, how many nodes will be traversed during a search for the node?
Explain the best- and worst-case search scenarios.
Explain why a singly-linked list defines a RemoveAfter() function, while a doubly-linked list defines a Remove() function.
Could a RemoveAfter() function also be defined for a doubly-linked list? Explain why or why not.
Could a Remove() function also be defined for a singly-linked list? Explain why or why not.
Chapter 3 Solutions
EBK DATA STRUCTURES AND ALGORITHMS IN C
Ch. 3 - Prob. 1ECh. 3 - Prob. 2ECh. 3 - Prob. 3ECh. 3 - Prob. 4ECh. 3 - Prob. 5ECh. 3 - Prob. 6ECh. 3 - Prob. 7ECh. 3 - Prob. 8ECh. 3 - Prob. 9ECh. 3 - Prob. 10E
Ch. 3 - Prob. 11ECh. 3 - Prob. 12ECh. 3 - Prob. 13ECh. 3 - Prob. 14ECh. 3 - Prob. 15ECh. 3 - Prob. 16ECh. 3 - Prob. 17ECh. 3 - Prob. 18ECh. 3 - Prob. 19ECh. 3 - Prob. 20ECh. 3 - Prob. 21ECh. 3 - Prob. 22ECh. 3 - Prob. 23ECh. 3 - Prob. 24ECh. 3 - Prob. 25ECh. 3 - Prob. 1PACh. 3 - Prob. 2PACh. 3 - Prob. 3PACh. 3 - Prob. 5PACh. 3 - Prob. 7PA
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In a 2- to 3-page paper, you will build on the material given in the course to answer the following questions: What is the difference between a single and doubly linked list? When might a singly-linked list be preferable than a doubly-linked list? When might a doubly-linked list be preferable than a singly-linked list? How many nodes will be visited during a search for a node that is in a linked list with N nodes? Describe the best- and worst-case scenarios for a search. Explain why a singly-linked list has the RemoveAfter() function while a doubly-linked list has the Remove() function. Is it possible to create a RemoveAfter() method for a doubly-linked list as well? Explain why you think that is or why you don't think that is. Is it possible to create a Remove() method for a singly-linked list as well? Explain why you think that is or why you don't think that is. Format your work according to the APA standards for the course you're in.arrow_forwardIn this assignment, you will expand on the information provided in the course to answer the following questions in a 2- to 3-page paper: What is the difference between a singly-linked list and a doubly-linked list? In what situation would you use a singly-linked list over a doubly-linked list? In what situation would you use a doubly-linked list over a singly-linked list? If a node is in a linked list with N nodes, how many nodes will be traversed during a search for the node? Explain the best- and worst-case search scenarios. Explain why a singly-linked list defines a RemoveAfter() function, while a doubly-linked list defines a Remove() function. Could a RemoveAfter() function also be defined for a doubly-linked list? Explain why or why not. Could a Remove() function also be defined for a singly-linked list? Explain why or why not. Format your paper according to appropriate course-level APA guidelines.arrow_forwardExplain in your own words the Analysis of Linked List operations (add,remove,find,back).arrow_forward
- From the following sets of linked lists, which set should be chosen as the head, tominimize the time complexity, when we do union operation on them? Why?Set A: 0-3-5-6-8-10Set B: 1-2-4-9arrow_forwardDo you know what the difference is between a single-linked list and a doubly-linked list? When is it better to use a singly-linked list rather than a doubly-linked list?When is it better to use a doubly-linked list rather than a singly-linked list? In a search for a node that is part of a linked list with N elements, how many nodes will be visited and how long will it take? Describe the best- and worst-case scenarios that may occur during a search operation.Explain why the RemoveAfter() function is present in a singly-linked list yet the Remove() function is present in a doubly-linked list.Could the RemoveAfter() function be extended to include a doubly-linked list as well as a simple list? Explain why you believe this is the case, or why you believe it is not the case.What are the chances of implementing a Remove() function for a singly-linked list? Explain why you believe this is the case, or why you believe it is not the case.arrow_forwardAssume that lists are implemented using an array. For each of the following List methods, say whether (in the worst case) the number of operations is independent of the size of the list (is a constant-time method), or is proportional to the size of the list (is a linear-time method)• the constructorarrow_forward
- I need a reference page for this question that was answered below. What is the difference between a singly-linked list and a doubly-linked list? In what situation would you use a singly-linked list over a doubly-linked list? In what situation would you use a doubly-linked list over a singly-linked list? If a node is in a linked list with N nodes, how many nodes will be traversed during a search for the node? Explain the best- and worst-case search scenarios. Explain why a singly-linked list defines a RemoveAfter() function, while a doubly-linked list defines a Remove() function. Could a RemoveAfter() function also be defined for a doubly-linked list? Explain why or why not. Could a Remove() function also be defined for a singly-linked list? Explain why or why not.arrow_forwardBy applying non-linear data structures , Write an Append() function that takes two lists, 'a' and 'b', appends 'b' onto the end of 'a'. ( Drop code in words , explain the code and also drop the screenshot of output as well )arrow_forwardDevelop a procedure for a linked list that removes duplicate keys at once.arrow_forward
- Develop a procedure to remove all nodes from a linked list that share a key.arrow_forwardWhat is the difference between a singly-linked list and a doubly-linked list? In what situation would you use a singly-linked list over a doubly-linked list? In what situation would you use a doubly-linked list over a singly-linked list?arrow_forwardIn a linked list containing N nodes, how many nodes must be traversed in order to locate a node? The best and worst case search scenariosHow do single-linked and double-linked lists vary from one another?Could a RemoveAfter() method exist for a doubly-linked list? If not, why not?Could the Remove() method be used on a single-linked list? If not, why not?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education