CSE 131 Module 6: Recursion

Important!

Before beginning any work, do a Team...Pull in your repository.

Lab


Procedure

Update your repository so that you see a lab6 package in the labs source folder.

Merge Sort

  1. Watch this video on merge sort:
  2. Implement createMergeCombinedArray
  3. /**
     * Creates a new array whose contents are a sorted in ascending lexicographical
     * order version of the subrange [min, maxExclusive) in the specified array.
     * 
     * For example, the array: { "H", "S", "C", "M", "I", "P" } with min: 1 and
     * maxExclusive: 3 would process the indices [1,3) (that is: 1 and 2) to return
     * a new array: { "C", "S" }.
     * 
     * This method must not mutate (that is: change the contents of) the specified
     * array, nor would it have any real reason to do so.
     * 
     * @param array
     *            an array
     * @param min
     *            the minimum index of interest (inclusive)
     * @param maxExclusive
     *            the maximum index of interest (exclusive)
     * @return a sorted array of the subrange of contents in the specified array
     *         from [min, maxExclusive).
     */
    private static String[] createSortedArrayInRange(String[] array, int min, int maxExclusive) {
    	throw new NotYetImplementedException("delete this line of code and implement this method.");
    }
    
  4. Run the MergeSortTestSuite in the lab6.tests package to test your work.
    Note: MergeSortDemonstrationVideoCompanionTest may be useful for debugging as it matches the above video.
  5. Compare your implementation of Merge Sort against your implementation of Selection Sort with the SortPerformanceTimingChartApp in the lab6.chart package to test your work.

Triangle

  1. Consider the picture below.


Submitting your work (read carefully)



Last modified 01:52:19 CDT 21 October 2018
When you are done with this lab, you must be cleared by the TA to receive credit.

This demo box is for lab 6
Credit (TA, verify!): ½ credit Merge sort works, but not Sierpinski
½ credit Sierpinski works, but not Merge sort
Full credit Both Merge sort and Sierpinski work
Last name WUSTL Key Propagate?
(NOT your numeric ID) Do not propagate
lower case only
e.g. Smith j.smith
1    

Acknowledgements and assertion of integrity

You must select one of the options below
The work submitted here was performed in accordance with this course's policy on collaboration.
On your honor, you have neither given nor received any unauthorized aid on this assignment.

However, the following TAs, students, or professors were supportive in completing this assignment.
Their help was also in accordance with course policies.

Thanks to (leave blank if appropriate):

In spite of seeking help as allowable by this course's policy on collaboration, you were unable to complete this assignment. No credit will be received for this assignment.

You would like to be contacted by an instructor to facilitate staying on track in this course.

Comments about this:

You have NOT abided by this course's policy on collaboration. No credit will be received for this assignment, but by checking this box, no academic integrity violation will be filed for this assignment.

You would like to be contacted by an intructor to faciliate staying on track in this course.

Comments about this:


TAs double check!
  • This demo box is for lab 6
  • The student has committed and pushed the work, and verified that it appears at bitbucket.
TA: Password: