View the step-by-step solution to:

# In lab final exam ideas Following are the possible topics for the in- lab final exam for next week . These all assume that we have struct Node int...

need help for in lab final exam. program should be in c++.

In lab final exam ideas
Following are the possible topics for the in- lab final exam for next
week . These all assume that we have
struct Node
int data
Node * Next
and in main we have
pointer to the head of the list
Node * Temp
Used to get new nodes
We will also provide for you the code that is used to create the list and the
code to traverse and display the list elements . You can assume that the
first node on the list is the Oth node , the second node is node 1 , and so
on . You can also assume the list already exists and has 7 elements in it
( nodes O through node 6 ) with both even and odd numbers . For the
examples below , assume the list we are starting with is the list
2 - &gt;3 - &gt;5 - 6 - 8 - 9 - 1 1
The ideas are
1 . Split a list at the node with a designated value , using function
splitlist ( Node * Original int split value , Node * &amp;p HeadA , Node
Enter the value to split the list : 6
Resulting lists are
2 - &gt;3- &gt;5 -1
8 - 9 - 1 1

2 . Traverse a list , creating two new lists : One with all the even values , and
the other with all the odd values
even Odd Lists ( Node * Original Node * &amp;p HeadEven , Node
Resulting lists are
2 - 6 - 8
3 - 5 - 9 - 1 1
Delete all the list nodes that contain even numbers
new OddList ( Node * Ap Head )
Resulting list is
3 - 5 - &gt;9 - 1 1

4 . Insert listB into the middle of listA after the list value n . We start with
pListA is : 2 - &gt; 3 - 9 - 1 1
plist Bis : 5 - 6 - 8
Insert List ( Node * pListA Node * pListB int insertValue )
Resulting lists is
2 - &gt;3 - &gt;5 - 6 - 8 - &gt;9 - -1 1
5 . A list has two sections : section A is the part up until the node with value
n , and section B is the part after that . Swap sections A and B
Original list : 2 - 3 - 5 - 6 - 8 - 9 - 1 1
swap List Sections ( Node * Head , int swap Value ) swap Value is 5 in this
case
First list part : 2 - 3 - 35
Second list part : 6 - 8 - 9 - 11
New list : 6 - 8 - &gt;9 - 1 1 - &gt;2 - &gt;3 - 5

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents