I want your suggestions on this algorithm:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;namespace FCFS_Console{    class Program    {        static void Main(string[] args)        {            //----------------------------------------Reading I/O File--------------------------------------            string s = Environment.CurrentDirectory.ToString();   // returns the directory of the exe file            if (File.Exists(s + @\input.txt)) //checking if the input files exists                Console.WriteLine(File Exists);            else            {                Console.WriteLine(File Not Found);                Console.WriteLine(_________________________________________________________________);                return;            }            Console.WriteLine(_________________________________________________________________);            //----------------------------------------Data Into List--------------------------------------            string FileText = File.ReadAllText(s + @\input.txt); //reading all the text in the input file            string[] lines = FileText.Split('\n'); //splitting the lines            List<Process> processes = new List<Process>();            for (int i = 1; i < lines.Length; i++)            {                string[] tabs = lines[i].Split('\t');//splitting the tabs to get objects' variables                Process x = new Process(tabs[0], int.Parse(tabs[1]), int.Parse(tabs[2]), int.Parse(tabs[3]));//creating object                processes.Add(x);//adding object to the list            }            //   ----------------------------------------Sorting The List--------------------------------------            Process temp;            for (int k = 0; k < processes.Count; k++)            {                for (int i = k + 1; i < processes.Count; i++)                {                    if (processes[k].arrivalTime > processes[i].arrivalTime || (processes[k].arrivalTime == processes[i].arrivalTime && processes[k].brust > processes[i].brust))                    {                        temp = processes[i];                        processes[i] = processes[k];                        processes[k] = temp;                    }                }            }            Console.WriteLine(Processes After Sorting);            Console.WriteLine(_________________________________________________________________);            Console.WriteLine(Name\tArrival\tBrust\tPriority);            for (int i = 0; i < processes.Count; i++)            {                Console.Write(processes[i].name + \t + processes[i].arrivalTime + \t + processes[i].brust + \t + processes[i].priority);                Console.WriteLine();            }            Console.WriteLine(_________________________________________________________________);            //----------------------------------------Gantt Chart--------------------------------------            Console.WriteLine(Gantt Chart);            Console.WriteLine(_________________________________________________________________);            int counter = 0;            for (int i = 0; i < processes.Count; i++)            {                Console.Write(processes[i].name + \t);                if (processes[i].arrivalTime < counter)                    printSpaces(counter);                else                {                    printSpaces(processes[i].arrivalTime);                    counter = processes[i].arrivalTime;                }                printHashes(processes[i].brust);                counter += processes[i].brust;                Console.WriteLine();            }            Console.WriteLine(_________________________________________________________________);            //-----------------------------------Completing Data And final Table-------------------------            int clock = 0, totalwait = 0, totalturnAround = 0;            for (int i = 0; i < processes.Count; i++)            {                if (processes[i].arrivalTime > clock)                {                    processes[i].start = processes[i].arrivalTime;                    clock += processes[i].start - processes[i].arrivalTime;                    clock += processes[i].brust;                }                else                {                    if (i > 0)                        processes[i].start = processes[i - 1].end;                    clock += processes[i].brust;                }                if (processes[i].start > processes[i].arrivalTime)                    processes[i].wait = processes[i].start - processes[i].arrivalTime;                else processes[i].wait = 0;                processes[i].end = processes[i].start + processes[i].brust;                processes[i].turnAround = processes[i].wait + processes[i].brust;                totalwait += processes[i].wait;                totalturnAround += processes[i].turnAround;            }            Console.WriteLine(Name\tArrival\tBrust\tStart\tEnd\tWait\tturnaround);            for (int i = 0; i < processes.Count; i++)            {                Console.Write(processes[i].name + \t + processes[i].arrivalTime + \t + processes[i].brust + \t + processes[i].start + \t + processes[i].end + \t + processes[i].wait + \t + processes[i].turnAround);                Console.WriteLine();            }            double att = 0, awt = 0;            awt = (double)totalwait / (double)processes.Count;            att = (double)totalturnAround / (double)processes.Count;            Console.WriteLine(A.W.T=  + awt + \t A.T.T=  + att);            Console.ReadKey();        }        public static void printSpaces(int counter)        {            for (int i = 0; i < counter; i++)            {                Console.Write( );            }        }        public static void printHashes(int brust)        {            for (int i = 0; i < brust; i++)            {                Console.Write(#);            }        }    }}Process Classusing System;using System.Collections.Generic;using System.Linq;using System.Text;namespace FCFS_Console{    class Process    {        public Process(string name, int arrivalTime, int brust, int priority)        {            this.name = name;            this.arrivalTime = arrivalTime;            this.brust = brust;            this.priority = priority;        }        public Process()        {        }        public string name;        public int arrivalTime;        public int brust;        public int priority;        public int wait;        public int end;        public int start;        public int turnAround;    }}Procedure:created the Process classreceived my input from a text fileused a list to store my processescreated objects from the classsorted the listprinted the Gantt Chartcompleted the rest of the process data like start, end, turn around, waitprinted the final tablecalculated the average wait time and the average turn around time
First-come first-serve (FCFS) algorithm
c#;algorithm
//Don't use this code.  Bubble Sort is slow.for (int k = 0; k < processes.Count; k++){    for (int i = k + 1; i < processes.Count; i++)    {        if (processes[k].arrivalTime > processes[i].arrivalTime ||             (processes[k].arrivalTime == processes[i].arrivalTime &&             processes[k].brust > processes[i].brust))        {            temp = processes[i];            processes[i] = processes[k];            processes[k] = temp;        }    }}Bubble sort is very slow when run on medium or large lists.  I recommend using a faster sort algorithm (e.g., Quick Sort), or using C#'s built-in sorting functions (e.g., the OrderBy extension method).  If you prefer to minimize how much you need to change your existing code, the code for Comb Sort is almost identical to that of bubble sort, while still running significantly faster.  That said, Comb sort is a bit less popular (and thus less well-understood) than other algorithms of similar efficiency.You may want extract each step in your algorithm (Sort, Chart, etc.) into a separate method.If speed is important to you, a profiler will tell you which step is worth optimizing first.