[Problem description] Give the union of two ordered lists. The maximal number of elements in an inputted set is 30. [Basic requirements] 1) Use sequential linear list. 2) The result list should also be ordered. [Example] Problem: Give the union of the ordered lists (3,4,9,100,103) and (7,9,43,53,102,105). What you need to show in the terminal(the back part is outputted by you and the blue part is inputted by the user, i.e., teacher): Please input the first ordered list: (3,4,9,100,103)Please input the second ordered list: (7,9,43,53,102,105) The union is: (3,4,7,9,9,43,53,100,102,103,105)

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter18: Stacks And Queues
Section: Chapter Questions
Problem 1TF
icon
Related questions
icon
Concept explainers
Question

[Problem description]

Give the union of two ordered lists. The maximal number of elements in an

inputted set is 30.

[Basic requirements]

1) Use sequential linear list.

2) The result list should also be ordered.

[Example]

Problem: Give the union of the ordered lists (3,4,9,100,103) and

(7,9,43,53,102,105).

What you need to show in the terminal(the back part is outputted by you

and the blue part is inputted by the user, i.e., teacher):

Please input the first ordered list: (3,4,9,100,103)Please input the second ordered list: (7,9,43,53,102,105)

The union is:

(3,4,7,9,9,43,53,100,102,103,105)

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
  • SEE MORE QUESTIONS
Recommended textbooks for you
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