You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
777 B

// The SortingAlgs class that implements insertion sort and iterative merge sort
// your name here
public class SortingAlgs
{
// card comparison
public int compares(Card c1, Card c2)
{
// TODO: implement this method
return -1; // replace this statement with your own return
}
// insertion sort
public void insertionSort(Card[] cardArray)
{
// TODO: implement this method}
}
// merge sort
public void mergeSort(Card[] cardArray)
{
// TODO: implement this method (in an iterative way)
}
// merge two sorted arrays into one sorted array
public void merge(Card[] cardArray, int first, int mid, int last)
{
// TODO: implement this method
}
}