Skip to content

giovanniledda/sp_flights_challenge

Repository files navigation

Shippy Pro - Flights price challenge

License

How to install the project

  • clone the repo on a local dir
  • compile your .env file
  • launch "composer install"
  • launch "php artisan migrate:fresh --seed"
  • launch "php artisan serve"

...and it's done!

The Challenge

Given:

TABLE 1:

  • - id
  • - name
  • - code
  • - lat
  • - lng

TABLE 2:

  • - code_departure
  • - code_arrival
  • - price

Try to create a PHP algorithm that finds the lowest price, given two different airport's code in table 1, assuming at most 2 stopovers!


The result is represented in a Blade Landing Page.

The Solution

You can find proof of solution by launching the command "php artisan test". To be more specific, the algorithm that finds the best price on DB data set can be found at class "App\Services\FlightScanner", function generalMinPriceOptimizedSearch().

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published