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
- Host: GitHub
- URL: https://github.com/jojoee/coding-challenges
- Owner: jojoee
- License: mit
- Created: 2016-08-01T12:30:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-18T22:06:14.000Z (about 7 years ago)
- Last Synced: 2025-04-19T15:56:56.919Z (10 months ago)
- Topics: coding-challenges
- Language: JavaScript
- Homepage:
- Size: 85.9 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Coding challenges
[](https://travis-ci.org/jojoee/coding-challenges) [](https://greenkeeper.io/)
For practicing coding challenge

## 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"
```