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

https://github.com/unixslayer/phpuzzles


https://github.com/unixslayer/phpuzzles

Last synced: 3 months ago
JSON representation

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)