Question: Please write in c++.Thankyou! Data for testing: ( 15pts) Write a code to return the median value in a sorted linked list. If the length

Please write in c++.Thankyou!

Please write in c++.Thankyou! Data for testing: ( 15pts) Write a code

Data for testing:

to return the median value in a sorted linked list. If the

length i of the list is odd, then the median is the

( 15pts) Write a code to return the median value in a sorted linked list. If the length i of the list is odd, then the median is the ceiling(i/2) member. For example, given the list (1,2,2,5,7,9,11) as input, your function should return the value 5 . If the length of the list is even, then the median is the mean of the i/2 and (i/2)+1 members. Thus, the median of the sorted list (2,4,8,9) is (4+8)/2. Finally, define the median of an empty list to be 0 . 100307506092901 102030405060708090

Step by Step Solution

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 Databases Questions!