Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm trying to merge sort a list of strings in c#. I've got a list of movie titles I need to merge sort and it

I'm trying to merge sort a list of strings in c#. I've got a list of movie titles I need to merge sort and it is returning the list back to me in the same unsorted format as the original list I pass into the method. I'm still fairly new to c# programming so I'm sure I'm just missing something here. Any advice would be greatly appreciated. Thank you!

I have included screenshots of the main arg where I am calling my merge sort method, as well as both parts of the merge sort method(s) and a picture of the results(displayed as unsorted on the righthand side, and the merge sorted list on the lefthand side).
 
main call.png
meth 1.png


meth 2.png


results.png



 


 

case 2: //merge sort List mergeSortedList = new List (unsortedTitles); mergeSort (mergeSortedList); Console.Clear(); Console.WriteLine("Merge Sort"); Console.WriteLine("- for (int i = 0; i < listLength; i++) { } Console.Write(unsorted Titles [i]); Console.CursorLeft = 50; Console.Write(mergeSorted List[i]); Console.WriteLine(" "); Console.WriteLine("- -"); -");

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

Taxation Of Individuals And Business Entities 2015

Authors: Brian Spilker, Benjamin Ayers, John Robinson, Edmund Outslay, Ronald Worsham, John Barrick, Connie Weaver

6th Edition

978-1259206955, 1259206955, 77862368, 978-0077862367

More Books

Students also viewed these Algorithms questions

Question

Explain the importance of intersectionality in sampling.

Answered: 1 week ago