These tests are designed to give us a sense of your style as a programmer as well as your ability to solve problems.
Like real life, we expect that you may need or want to look at some completed solutions to these problems in order to inspire your solution. Please keep in mind though that during the next stage of the interview process you will need to make alterations to your code to solve for different use-cases and/or edge-cases, so please make sure to write something that you understand and can work with on the fly.
This is what you'll need to do to submit your challenge:
- Fork this repo
- Once you're finished, email us a link to your repo
This challenge includes a testing suite that can be accessed with the command npm test
in the root of the project.
Additionally, by using babel you are also able to write your solution using ES6.
Write some code that evolves generations through the "game of life". The input will be a game board of cells, either alive (1) or dead (0).
The code should take this board and create a new board for the next generation based on the following rules:
- Any live cell with fewer than two live neighbours dies (underpopulation)
- Any live cell with two or three live neighbours lives on to the next generation (survival)
- Any live cell with more than three live neighbours dies (overcrowding)
- Any dead cell with exactly three live neighbours becomes a live cell (reproduction)
As an example, this game board as input:
0 1 0 0 0
1 0 0 1 1
1 1 0 0 1
0 1 0 0 0
1 0 0 0 1
Will have a subsequent generation of:
0 0 0 0 0
1 0 1 1 1
1 1 1 1 1
0 1 0 0 0
0 0 0 0 0
Write code that will evaluate a poker hand and determine its rank.
Example:
Hand: Ah As 10c 7d 6s (Pair of Aces)
Hand: Kh Kc 3s 3h 2d (2 Pair)
Hand: Kh Qh 6h 2h 9h (Flush)
Write code that will accept a number and convert it to the appropriate string representation.
Basic Requirements:
- Represent numbers to the hundredth position
- Represent numbers as high as one billion
Examples:
Convert 2523.04 to "Two thousand five hundred twenty-three and 04/100"