This app is a solution for the test: https://github.com/armel/GlobTest
Answers:
- The function foo takes all the intervals given as input and factors them all by combining the intervals that have an intersection. It returns the new collection of factored intervals.
-
- Clone the project
- run composer install
- run test: vendor/bin/phpunit tests/BarTest.php
- It takes me 3 hours :(