Skip to content

lenzoburger/ProblemSolving326

Repository files navigation

ProblemSolving326

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.

Setup

Install dependencies

  1. Install Java Development Kit
  2. Ensure Java/JDK is included in PATH & set JAVA_HOME variable

Clone

  1. Clone repo: git clone https://github.com/lenzoburger/ProblemSolving326.git
  2. Launch Terminal/CMD
  3. Compile & Run solutions

Compile

For each solution:

  1. Change working directory cd <solutionName>
  2. Compile javac -d . *.java

Run

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

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

Epidemic

  • Usage: java epidemic.Epidemic < <universeState_File>
    • Example: java epidemic.Epidemic < test\d1.txt
  • Usage: java epidemic.EpidemicP2 < <universeState_File>
    • Example: java epidemic.EpidemicP2 < test\d0.txt

Counting it up

  • Usage: java CountingUp <deckSize n> <drawn k>
    • Example: java countingItUp.CountingUp 104 7

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
  • Usage: java pentonimoes.PentominoesSolve < <solvePuzzle_File>
    • Example: java pentonimoes.PentominoesSolve < test\solve\input.txt

Poker

  • Usage: java poker.Poker < <pokerHand_File>
    • Example: java poker.Poker < test\pokerInput.txt

Repeated Digits

  • Usage: java repeatedDigits.findBlock <base b> <integer n>
    • Example: java repeatedDigits.findBlock 10 30
  • Usage: java repeatedDigits.findRepeat <base1 b> <base2 c>
    • Example: java repeatedDigits.findRepeat 56 78

Smoker's Problem

  • Usage: java smokersProblem.SProblem < <GridInput_File>
    • Example: java smokersProblem.SProblem < test\big.txt
  • For Very Large Grids: java -Xss<size> smokersProblem.SProblem < <LARGEGridInput_File>
    • Example: java -Xss2M smokersProblem.SProblem < test\massive.txt

Telephone Numbers

  • Usage: java telephoneNumbers.TeleNumberApp < <TeleNumInput_File>
    • Example: java telephoneNumbers.TeleNumberApp < test\sample.txt

Threes

  • Usage: java threes.Threes2

Toothpicks

  • Usage: java ToothpicksApp <generations n> <OPTIONAL: ratio r>
    • Example: java toothpicks.ToothpicksApp 10 0.5

Word Chains

  • Usage: java WordChainsApp <firstWord> <lastWord> <OPTIONAL: chainLength> < <wordsList_File>
    • Example: java wordChains.WordChainsApp abed bulk 500 < test\superMassive.txt

Tools & Dependencies

Dependencies

  1. Java Development Kit

Tools

  1. Git
  2. Visual Studio Code + Extensions:

About

Series of solutions to programming and mathematical problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages