Sorting activities:

selection sort

insertion sort

merge sort

quicksort

comparing sort

 

There will be a quiz particularly about insertion sort and selection sort. Study how they work. Take quiz16c.

Lets review and write them.

Start with the code here:

 

public class ArraySort {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		ArraySort s=new ArraySort();
		s.printList();
		//s.insertionSort();
		//s.selectionSort();
		//s.printList();

	}

	private int[] myList={5,9,0,10,1,15,6,2,7,9};

	public void printList()
	{
		for (int i:myList)
			System.out.println(i);
	}

	public void insertionSort()
	{

	}

	public void selectionSort()
	{

	}

}

 

Starting repl.it

This project is to test sorts by looking at SAT data.

1. Create and call the methods in SATSortActivity that are missing. Use any sort you want.