Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please help me get started with this project in C++? Just write in pseudocode and please don't do the whole thing! I just

Can you please help me get started with this project in C++? Just write in pseudocode and please don't do the whole thing! I just want to know where to begin. Thank you.

image text in transcribedimage text in transcribed

1. Assume we use two linked lists that represent Set A and Set B respectively. Implement the following function to calculate A U B and return the result as a new linked list. Note that a SET should not contain duplicate elements (e.g., integers). (50 Points) Node * unionLL (Node * LA, Node * LB); 2. There are two linked lists, LA and LB. Their elements are both in the non-descending order. Implement the following function to merge LA and LB into a new linked list (as the return value). The elements in the new list should still be in the non-descending order. (50 Points) Node * mergeLL (Node * LA, Node * LB); * Example: LA = (3,5,8, 11) LB = (2, 6, 8, 9, 22, 24) unionLL(LA, LB) = (3, 5, 8, 11, 2, 6, 9, 22, 24) // The order of the elements may change. mergeLL (LA, LB) = (2, 3, 5, 6, 8, 8, 9, 11, 22, 24) = Additional requirements: 1. The input linked lists, LA and LB, should not be changed in either of these two functions. 2. Create a main function and print out the numbers in the linked lists before and after executing each method above. Assume Node is defined as follows: struct Node{ int num; Node * next; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

What is IUPAC system? Name organic compounds using IUPAC system.

Answered: 1 week ago

Question

What happens when carbonate and hydrogen react with carbonate?

Answered: 1 week ago