/golang-scripts

DSA and Maths in Go

Primary LanguageGo

Golang Scripts

To run the project in a Docker container (installation), run:

make

This will build a docker image for the scripts and tests, will run all tests and print logs. The make run and make build commands are also available separately.

To install Go, please refer to the official website.

Programming

  • List rotations
  • Trailing MaxMin
  • Permutation cycles
  • Interval union
  • Trades
    • Totals
    • Positions

Mathematics

Logic

  • Price per kg
  • Soccer championship
    • Number of matches per team
    • Total number of matches
    • Min score to become champion
    • Max score to be downgraded

Probability

  • Two dice
    • P(sum is odd)
    • P(product is odd)
    • P(sum <= 5)
  • Tennis
    • P(deuce)
    • P(first to deliver wins)
    • Script
  • Ballot box
    • P(last ball removed is blue)