public void run(){
        long startTime, endTime;
		double execTime;
		
		switch (sortToRun) {
			case 'I':
				// Take intrinsic lock on 'System' class
				// to prevent thread interference in timing measurements.
				synchronized(System.class){			
					startTime = System.nanoTime();
					InsertionSort<T> insertObj = new InsertionSort<T>(this.lst);
					endTime = System.nanoTime();
				}
				execTime = (endTime - startTime) / (10e9);

				// Check that the sort was performed correctly
				if (this.checkResult(this.lst)){
					System.out.println("Insertion Sort execution time: "+ execTime + " secs");
				} else {
					System.err.println("The list did not sort in natural order.");
					System.exit(1);
				}
				break;
			
			case 'S':
				// Take intrinsic lock on 'System' class
				// to prevent thread interference in timing measurements.
				synchronized(System.class){
					startTime = System.nanoTime();
					SelectionSort<T> selObj = new SelectionSort<T>(this.lst);
					endTime = System.nanoTime();
				}
				execTime = (endTime - startTime) / (10e9);

				// Check that the sort was performed correctly
				if (this.checkResult(this.lst)){
					System.out.println("Selection Sort execution time: "+ execTime + " secs");
				} else {
					System.err.println("The list did not sort correctly.");
					System.exit(1);
				}
				break;
			case 'M':
				// Take intrinsic lock on 'System' class
				// to prevent thread interference in timing measurements.
				synchronized(System.class){
					startTime = System.nanoTime();
					MergeSort<T> mergeObj = new MergeSort<T>(this.lst);
					endTime = System.nanoTime();
				}
				execTime = (endTime - startTime) / (10e9);
				
				// Check that the sort was performed correctly
				if (this.checkResult(this.lst)){
					System.out.println("Merge Sort execution time: "+ execTime + " secs");
				} else {
					System.err.println("The list did not sort correctly.");
					System.exit(1);
				}
				break;
			case 'Q':
				// Take intrinsic lock on 'System' class
				// to prevent thread interference in timing measurements.
				synchronized(System.class){
					QuickSort<T> quickObj = new QuickSort<T>(this.lst);
					int low = 0, high = (this.lst.size() - 1);
					startTime = System.nanoTime();
					this.lst = quickObj.sort(low, high);
					endTime = System.nanoTime();
				}
				execTime = (endTime - startTime) / (10e9);
				if (this.lst != null) {
					// Check that the sort was performed correctly
					if (this.checkResult(this.lst)){
						System.out.println("Quick Sort execution time: "+ execTime + " secs");
					} else {
						System.err.println("The list did not sort correctly.");
						System.exit(1);
					}
				}
				break;

			default:
					System.err.println("Invalid value of 'sortToRun'");
					System.exit(1);
		}
		return;
	}