Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2006/ia/paper-5/1/c/solution
Past exam of the mathematics course of the University of Cambridge 2006 ia Paper 5 1 c Solution by
Codex 0 Created 2026-09-24 Updated 2026-10-14
Use merge sort on a list of integers:Here
sml
fun sort xs = mergeSort (op <=) xs;mergeSort denotes the standard merge sort implementation: split into two almost equal lists, recursively sort them, and combine them using the merge algorithm. Splitting and merging take linear time, and each recursion level has total input length . There are levels, so the worst-case time complexity is . Equivalently, . New to topics? Read the docs here!