Description
CSCI 461 Project Two focuses on implementing the Quick Sort algorithm using Standard ML (SML). The project explores recursive sorting, pivot selection, list partitioning, integer list manipulation, and functional programming techniques. Students develop a quick sort function that organizes integers in ascending order while following the merge sort coding style and using local helper functions within let expressions.
Assignment Description
Problem Description( Refer to Exercise 6 on Page 116)
Write a quick sort function of type int list -> int list. Here is a review for quick sort
algorithm. First pick an element and call it pivot. (The head of the list is an easy
choice for the pivot.) Partition the rest of the list into two sublists, one with all the
elements less than the pivot and another one with all the elements not less than the
pivot. Recursively sort the sublists. Combine two sublists and pivot into final sorted
list.
Requirement:
The solution must follow the style of function merge sort on page 114. The help
functions must be made inside let.
Sample Run:
Please see the screen shot below to see the sample run
File to turn in:
Save your function in file names YourNameProjTwo.sml and submit it via
blackboard link.
Due Date:
Will be announced on blackboard.
Solution Overview
The solution addresses a Standard ML quick sort function of type int list -> int list. It covers pivot selection, partitioning integers into two sublists, recursive sorting, and combining sorted results, with helper functions defined inside let expressions following the required merge sort style.


