https://github.com/unixslayer/phpuzzles
https://github.com/unixslayer/phpuzzles
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/unixslayer/phpuzzles
- Owner: unixslayer
- License: gpl-3.0
- Created: 2019-05-17T10:57:59.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-17T21:43:08.000Z (about 6 years ago)
- Last Synced: 2025-02-10T21:38:24.906Z (4 months ago)
- Language: PHP
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHPuzzles
Some PHP Puzzles I play with from following sources:
- [CodeWars](https://www.codewars.com)
### Anagrams
The task is to write a function that will find all the anagrams of a word from a list.
[Problem](docs/Anagrams.md) [Solution](src/Anagrams.php) [Test](tests/AnagramsTest.php)
### Consecutive strings
The task is to return the first longest string consisting of specific number of consecutive strings taken in the array.
[Problem](docs/Consecutive.md) [Solution](src/Consecutive.php) [Test](tests/ConsecutiveTest.php)
### Multipies of 3 or 5
The task is to write a function that returns the sum of all natural numbers that are the multiples of 3 or 5 below the number passed in.
[Problem](docs/Multipies.md) [Solution](src/Multipies.php) [Test](tests/MultipiesTest.php)
### Reverse Polish Notation (RPN)
Task is to create a calculator which evaluates expressions in Reverse Polish notation.
[Problem](docs/ReversePolishNotation.md) [Solution](src/ReversePolishNotationCalculator.php) [Test](tests/ReversePolishNotationCalculatorTest.php)
### Consecutive Fibonacci Product
Given a number, say prod (for product), we search two Fibonacci numbers F(n) and F(n+1) verifying
F(n) * F(n+1) = prod.
[Problem](docs/ConsecutiveFibonacciProduct.md) [Solution](src/ConsecutiveFibonacci.php) [Test](tests/ConsecutiveFibonacciTest.php)