thehappybug / dynamic-programming

Example Implementations of Dynamic Programming algorithms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamic Programming

Implements the following algorithms as examples of Dynamic Programming:

Implementation is provided in the package io.gitbub.thehappybug.Algorithms.

Compiling

The project can be compiled using make tool:

$ make
cd io/github/thehappybug/Algorithms/ && javac *.java

The build directory can be cleaned again by running make clean.

$ make clean
rm io/github/thehappybug/Algorithms/*.class

Running

$ cat inputs/fib.txt | java -cp "." io.github.thehappybug.Algorithms.FibonacciModified
5
$ cat inputs/knap.txt | java -cp "." io.github.thehappybug.Algorithms.Knapsack
12    
$ cat inputs/lcs.txt | java -cp "." io.github.thehappybug.Algorithms.LCS
3 4 1

Results

Modified Fibonacci

fibonacci

Knapsack

knap

Longest Common Subsequence

lcs

About

Example Implementations of Dynamic Programming algorithms

License:MIT License


Languages

Language:Java 97.3%Language:Makefile 2.7%