Series of solutions to programming and mathematical problems. Problem sets have specific requirements as well as time complexity (Big O) constraints. To meet these requirements and contraints the solutions utilise; mathematical models, various Data Structures, Graph Algorithms, Sorting & Searching algorithms, Heuristic algorithms and Randomized algorithms.
- Install Java Development Kit
- Ensure Java/JDK is included in PATH & set JAVA_HOME variable
- Clone repo:
git clone https://github.com/lenzoburger/ProblemSolving326.git - Launch Terminal/CMD
- Compile & Run solutions
For each solution:
- Change working directory
cd <solutionName> - Compile
javac -d . *.java
Refer to <solutionName>_requirement.pdf for more info
**Note: With very large/complex input data increasing stack size may be required for solutions with deep recursion in order to avoid StackOverflowError. Via java -Xss<size> SolutionName
Carpets
- Usage:
java carpets.MakeCarpet <carpetSize> <MatchType> < <carpetPieces_File>- Example:
java carpets.MakeCarpet 5 -n < test\t0.txt
- Example:
Colour of the day
- Usage:
java colourOfTheDay.GenerateCOTD - Usage:
java colourOfTheDay.GenerateCOTDAlt
Counting it up
- Usage:
java CountingUp <deckSize n> <drawn k>- Example:
java countingItUp.CountingUp 104 7
- Example:
Epidemic
- Usage:
java epidemic.Epidemic < <universeState_File>- Example:
java epidemic.Epidemic < test\d1.txt
- Example:
- Usage:
java epidemic.EpidemicP2 < <universeState_File>- Example:
java epidemic.EpidemicP2 < test\d0.txt
- Example:
Counting it up
- Usage:
java CountingUp <deckSize n> <drawn k>- Example:
java countingItUp.CountingUp 104 7
- Example:
Numbers
- Usage:
java numbers.HarmonicNums - Usage:
java numbers.StandardDeviation - Usage:
java numbers.Identity <x> <y>, Example:java numbers.Identity 567 674
Pentonimoes
- Usage:
java pentonimoes.PentominoesFill < <fillPuzzle_File>- Example:
java pentonimoes.PentominoesFill < test\fill\base.txt
- Example:
- Usage:
java pentonimoes.PentominoesSolve < <solvePuzzle_File>- Example:
java pentonimoes.PentominoesSolve < test\solve\input.txt
- Example:
Poker
- Usage:
java poker.Poker < <pokerHand_File>- Example:
java poker.Poker < test\pokerInput.txt
- Example:
Repeated Digits
- Usage:
java repeatedDigits.findBlock <base b> <integer n>- Example:
java repeatedDigits.findBlock 10 30
- Example:
- Usage:
java repeatedDigits.findRepeat <base1 b> <base2 c>- Example:
java repeatedDigits.findRepeat 56 78
- Example:
Smoker's Problem
- Usage:
java smokersProblem.SProblem < <GridInput_File>- Example:
java smokersProblem.SProblem < test\big.txt
- Example:
- For Very Large Grids:
java -Xss<size> smokersProblem.SProblem < <LARGEGridInput_File>- Example:
java -Xss2M smokersProblem.SProblem < test\massive.txt
- Example:
Telephone Numbers
- Usage:
java telephoneNumbers.TeleNumberApp < <TeleNumInput_File>- Example:
java telephoneNumbers.TeleNumberApp < test\sample.txt
- Example:
Threes
- Usage:
java threes.Threes2
Toothpicks
- Usage:
java ToothpicksApp <generations n> <OPTIONAL: ratio r>- Example:
java toothpicks.ToothpicksApp 10 0.5
- Example:
Word Chains
- Usage:
java WordChainsApp <firstWord> <lastWord> <OPTIONAL: chainLength> < <wordsList_File>- Example:
java wordChains.WordChainsApp abed bulk 500 < test\superMassive.txt
- Example: