Skip to content

hunlan/cse403sortingoption

Repository files navigation

To use our program, you need to run our code as a django project. Once you are on our site, we present you with two options. The first is a file chooser to upload the text file that contains the URLs that you would like to sort. The second option is a radio button that allows you to choose between eight (2 x four) different sorting options. Once you have selected both a file and a sorting option, you can click on the button located below to perform the chosen sorting algorithm on that file. Once the algorithm has terminated, the file will automatically request to be downloaded to the default directory of your web browser.

Like the assignment requested, we implemented four different algorithms. However, we could not fulfill all of the requested running times. We implemented an algorithm, insertion sort, that runs in O(n^2). Then we fulfilled the request for another two  O(nlogn) running time algorithms, which were heap sort and merge sort. The final request, which was for an algorithm with a running time of  O(n), simply could not be accomplished without placing unreasonable constraints on the input of program. Instead we focused on a third O(nlogn) running time algorithm called binary tree sort. We figured that the customer would rather have a third, robust algorithm instead of an algorithm that would give unreasonable performance if they violated the constraints.

We chose to implement our program as a django project because it would give us the necessary practice for the larger scope of our course project. We also felt that a customer facing web application would be the most convenient means for the user to interact with our program. Instead of having to delve into the command line to run program, the user is given a nice, clean interface that gives them the convenience of a file chooser and radio buttons so that the process of selecting a file and sorting algorithm is quick and painless. We do not have to tell the user how to use our program, it should be intuitive simply from the GUI presented.

Addition to Part 2: We added 4 sorting algorithm from another group. Since their implementation closely resembles our implementation (in terms of taking a list of urls as inputs and outputing a list of sorted urls as output), we adopted their code by wrapping their code within class which implements our own Sorter interface. One assumption that the other group made for the radix sort is that the url consist of ascii character (meaning all characters are made from a byte), which might exclude some url with unicode representation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages