An open API service indexing awesome lists of open source software.

https://github.com/jojoee/coding-challenges

:trophy: For practicing coding challenge
https://github.com/jojoee/coding-challenges

coding-challenges

Last synced: 7 months ago
JSON representation

:trophy: For practicing coding challenge

Awesome Lists containing this project

README

          

# Coding challenges
[![Build Status](https://travis-ci.org/jojoee/coding-challenges.svg)](https://travis-ci.org/jojoee/coding-challenges) [![Greenkeeper badge](https://badges.greenkeeper.io/jojoee/coding-challenges.svg)](https://greenkeeper.io/)

For practicing coding challenge

![Screenshot](https://raw.githubusercontent.com/jojoee/coding-challenges/master/screenshot/screenshot1.jpg "Screenshot")

## Getting Started
1. Install [Node.js](https://nodejs.org/en/)
2. Set path (e.g. `cd C:\xampp\htdocs\jojoee.com\coding-challenges`)
3. Install global: `npm install -g gulp`
4. Install dependencies: `npm install`
5. Start: `npm run test.watch` (to develop)

## Note
- Code style: [Airbnb](https://github.com/airbnb/javascript)

## TODO
- [ ] Refactor `Puzzle 1` into smaller functions and improve logic
- [ ] Separate module
- [ ] Implement [Shields.io](http://shields.io/)
- [ ] Implement [JSHint](http://jshint.com/)
- [ ] Implement [JSCS](http://jscs.info/)

## Puzzle
Find f(x1[, x2[, ...[, xn]]])

### Puzzle 1
```
x1 x2 f(x1, x2)

1 | ["ab"] | "xxxxxxabxxxxx" | "xxxxxxabxxxxx"
2 | ["ab", "bc"] | "xxxxxxabxxbcxxx" | "xxxxxxabxxbcxxx"
3 | ["abbbbb", "bbbbbc"] | "xxxxxxabbbbbcxxx" | "xxxxxxabbbbbcxxx"
4 | ["abbbbb", "bbb"] | "xxxxxxabbbbbcxxx" | "xxxxxxabbbbbcxxx"
5 | ["111", "2222"] | "xxxxxxabbbbbcxxx" | "xxxxxxabbbbbcxxx"
6 | ["abbb", "2222"] | "xxxxxxabbbbbcxxx" | "xxxxxxabbbbbcxxx"
```