This is the repo for my final project. This project is trying to solve the longest increasing subsequence problem with three different algorithms: Brute Force, Dynamic Programming, and Greedy. The project will run different size of test cases on these algorithms and track their runtimes. This project will provide line chart to visualize the result as well.
The necessary documents, including final project report, result screenshots, and runtime plot, are located in Document folder.
The source code is written in Java and the project is located in LongestIncreasingSubsequence folder. In this folder, you can find all the source code under src folder. For more details of the source code, you can find in the Code Explanation section.
The code has four parts: Controller, Model, Utility, and UnitTest
The controller is the main gate of the whole project. The controller contains all necessary functions to control the different algorithm. For example:
LongestIncreasingSubsequence.runBruteForceSolution(int[] input)
The user can easily use these methods to invoke these algorithms and the controller can make the project flexible. Currently, the controller provides methods for users to run the algorithm with different inputs, and calculate the runtime for different algorithms.
The model is the part that contains different algorithms. The Solution object is the base model object for all others algorithms' objects. Each algorithm object contains the specific algorithm to solve this issue.
The Util part contains the necessary utilities for models or have other purposes. In this folder, the RuntimePlot object is used to generate the runtime plot with the help of JavaFX. The TestCases object contains all the test cases for the unit test.
The test of this object utilized the JUnit framework to do the test. The structure of the test is each test runs a test case for all the algorithms. All of these algorithms should have the same result. Each test will print the runtime for each algorithm as well. The user can find the result in console.
For more information or if you have any questions, please contact me!