8000 GitHub - tolemi-inc/tournament: Tally the results of a small football competition.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tolemi-inc/tournament

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kindly taken from https://exercism.org/tracks/elixir/exercises/tournament

Full credits to problem definition and project setup to the original authors.

Tolemi - Interview Exercise

This repository is used as an interview exercise for engineering candidates.

Instructions

  • clone repository
  • checkout implementation branch
  • review the proposed implementation provided by another engineer
  • identify areas of improvement
  • improve, refactor the code
  • prepare to explain the changes and the reasoning behind them during the interview
  • prepare to explain further improvements that could be made to the code if you had more time

Areas that we are interested in:

  • code quality - readability, reliability, maintainability, performance, etc.
  • readability - how easy is it to understand the code?
  • reliability - how robust is the code? how will it handle edge cases?
  • maintainability - how easy is it to maintain the code? how easy is it to add new features?
  • performance - how will this code scale? how will it handle large amounts of data?

Time Constraints

We do not expect you to spend more than 2 hours on this exercise.

If there is more that can be done, please include it in your feedback. We are aware that it is hard to cover every single improvement, edge case etc. Please prioritize what you believe is most important.

Assumptions

Feel free to make any assumptions you need to in order to complete the exercise and be ready to voice them during the interview.

Original README.md

Tournament

Welcome to Tournament on Exercism's Elixir Track. If you need help running the tests or submitting your code, check out HELP.md. If you get stuck on the exercise, check out HINTS.md, but try and solve it without using those first :)

Instructions

Tally the results of a small football competition.

Based on an input file containing which team played against which and what the outcome was, create a file with a table like this:

Team                           | MP |  W |  D |  L |  P
Devastating Donkeys            |  3 |  2 |  1 |  0 |  7
Allegoric Alaskans             |  3 |  2 |  0 |  1 |  6
Blithering Badgers             |  3 |  1 |  0 |  2 |  3
Courageous Californians        |  3 |  0 |  1 |  2 |  1

What do those abbreviations mean?

  • MP: Matches Played
  • W: Matches Won
  • D: Matches Drawn (Tied)
  • L: Matches Lost
  • P: Points

A win earns a team 3 points. A draw earns 1. A loss earns 0.

The outcome is ordered by points, descending. In case of a tie, teams are ordered alphabetically.

Input

Your tallying program will receive input that looks like:

Allegoric Alaskans;Blithering Badgers;win
Devastating Donkeys;Courageous Californians;draw
Devastating Donkeys;Allegoric Alaskans;win
Courageous Californians;Blithering Badgers;loss
Blithering Badgers;Devastating Donkeys;loss
Allegoric Alaskans;Courageous Californians;win

The result of the match refers to the first team listed. So this line:

Allegoric Alaskans;Blithering Badgers;win

means that the Allegoric Alaskans beat the Blithering Badgers.

This line:

Courageous Californians;Blithering Badgers;loss

means that the Blithering Badgers beat the Courageous Californians.

And this line:

Devastating Donkeys;Courageous Californians;draw

means that the Devastating Donkeys and Courageous Californians tied.

Source

Created by

  • @DoggettCK

Contributed to by

  • @angelikatyborska
  • @Cohen-Carlisle
  • @devonestes
  • @neenjaw
  • @sotojuan

About

Tally the results of a small football competition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0