Read the problem statement, code a working solution (valid input and output will be provided) and supporting tests using a language of your choice. Be prepared to explain your solution during a review.
We want you to create a production ready, maintainable, testable command-line application that will calculate the ranking table for a league.
The input and output will be text. Either using stdin/stdout or taking filenames on the command line is fine.
The input contains results of games, one per line. See “Sample input” for details. The output should be ordered from most to least points, following the format specified in “Expected output”.
You can expect that the input will be well-formed. There is no need to add special handling for malformed input files.
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).
This should be implemented in a language with which you are familiar. We would prefer that you use javascript, coffeescript, ruby, python, java, or C, if you are comfortable doing so. If none of these is comfortable, please choose a language that is both comfortable for you and suited to the task.
If you use other libraries installed by a common package manager (rubygems/bundler, npm,
Client: React, Redux, TailwindCSS
Server: Node, Express
Install my-project with npm
npm install my-project
cd my-project
To run tests, run the following command
npm run test
import Component from 'my-project'
function App() {
return <Component />
}