using System.Collections.Generic;
public static void Main()
Console.WriteLine("INPUT:");
string[] stringArray = Console.ReadLine().Split(' ');
int[] unsortedArray = Array.ConvertAll(stringArray, Int32.Parse);
List<int> list = unsortedArray.ToList();
QuickSort(list, 0, unsortedArray.Length - 1);
Console.WriteLine("QUICK SORTED LIST: " + string.Join(" ", list));
private static void QuickSort(List<int> list, int lo, int hi)
int partitionIndex = Partition(list, lo, hi);
QuickSort(list, lo, partitionIndex - 1);
QuickSort(list, partitionIndex +1, hi);
private static int Partition(List<int> list, int lo, int hi)
for (int j = lo; j <= hi - 1; j++)