C++ Code  Use the following list to sort it and create a single linked list: 6,13,7,11,9,2,15,5,3,4,10,14 Also make a list of the available memory.  Print the list out with the links.   Now delete 11 from the list, adding its location to the available memory list, then add 1 and 8 to the list.   When you add the 1 you should use the location of the deleted 11 to add 1 there.  Add 8 to the next available spot on the available memory list.   When you print the list, print out the logical list using the links and also print out  physical list without the links to see what the real list looks like.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 3E
icon
Related questions
icon
Concept explainers
Question

C++ Code 

Use the following list to sort it and create a single linked list:

6,13,7,11,9,2,15,5,3,4,10,14

Also make a list of the available memory.  Print the list out with the links.  

Now delete 11 from the list, adding its location to the available memory list, then add 1 and 8 to the list.   When you add the 1 you should use the location of the deleted 11 to add 1 there.  Add 8 to the next available spot on the available memory list.  

When you print the list, print out the logical list using the links and also print out  physical list without the links to see what the real list looks like.  

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Linked List
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
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning