Skip to content
i3az0kimchi edited this page Nov 8, 2012 · 17 revisions

###About urlsort.py This program takes in a file containing a list of URLs, one per line, and produces an output file with the URLs in lexicographically sorted order. The user can choose from four provided sorting algorithms, plus four additional algorithms from Change My Mood, listed below. This program assumes that the URLs are well formed and contain only ASCII characters.

###Languages Python 2.7, Python 3.3

###Usage Usage: urlsort.py -f [FILE] -s [sorting algorithm] -o [OUT]

Options:
  --version               show program's version number and exit
  -h, --help              show this help message and exit
  -f FILE, --file=FILE    The FILE from which we will read
  -s ALG, --sort-alg=ALG  The type of sorting algorithm to use, 
                            1 = selection sort  
                            2 = heap sort  
                            3 = merge sort  
                            4 = radix sort
                                5 = binary sort (CMM)
                                6 = heap sort (CMM)
                                7 = insertion sort (CMM)
                                8 = merge sort (CMM)
  -o OUT, --output=OUT  The sorted output will be printed to OUT (defaults to 
                      'output.txt').

###Sorting

  • Selection sort O(n²)
  • Heap sort O(nlogn)
  • Merge sort O(nlogn)
  • Radix sort O(n)
  • Binary sort O(n²)
  • Heap sort O(nlogn)
  • Insertion sort O(n²)
  • Merge sort O(nlogn)

###Team division

  • Caylan Lee - Output and writeup
  • Yoong Woo Kim - Radix sort
  • Andrew Davies - Heap sort
  • Ivan Darmansyah - Input
  • Peter Weisbeck - Selection sort
  • Brian Oliphant - Testing
  • Kyle Boone - Merge sort
Clone this wiki locally