Question: QUESTION 4) [15 points] Assume that you are given an unordered Linked List as shown in the following example. The struct Node definition is

QUESTION 4) [15 points] Assume that you are given an unordered Linked

QUESTION 4) [15 points] Assume that you are given an unordered Linked List as shown in the following example. The struct Node definition is also given below. struct Node { int data; struct Node * next; Start1 30 10 20 40 Write the C function whose prototype is : struct Node * Divide (struct Node * Start1); Function takes the start pointer of a linked list (Start1), then divides the list into two lists, and returns the Start2 pointer. By looping, function should compute the number of nodes (N) in the original list. Dividing should be done as equal as possible, at the (N/2)th location from the Start1. The following is an example. (N=4, so the dividing location is N/2=2) Start1 Start2 30 10 20 40

Step by Step Solution

3.49 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!