Skip to content

warrenboucher/league-ranking-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

League-Ranking-Calculator

Application that will calculate the ranking table for a league.

Rules

In this league, a draw (tie) is worth 1 point and a win is worth 3 points. A loss is worth 0 points. If two or more teams have the same number of points, they should have the same rank and be printed in alphabetical order (as in the tie for 3rd place in the sample data).

Sample Input

Lions 3, Snakes 3
Tarantulas 1, FC Awesome 0
Lions 1, FC Awesome 1
Tarantulas 3, Snakes 1
Lions 4, Grouches 0

Expected Output

  1. Tarantulas, 6 pts
  2. Lions, 5 pts
  3. FC Awesome, 1 pt
  4. Snakes, 1 pt
  5. Grouches, 0 pts

Command Line Parametes

-i input file
-o output file

About

calculate the ranking table for a league.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages