iamfarhad / smart-algorithm

smart-algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker

$ docker-compose up -d
$ cp .env.example .env
$ docker-compose exec -it algorithm composer install
$ docker-compose exec -it algorithm php artisan key:generate

Run Tests

$ docker-compose exec -it algorithm ./vendor/bin/phpunit --coverage-html ./html-coverage

Time and memory complexity

Iterative Algorithm

Time complexity is O(n) Memory complexity is O(n)

Recursive Algorithm

The time complexity of the recursive is T(2^N), i.e., exponential.

The Space complexity of the recursive code is O(N) for a recursive series.

The best Algorithm is

namespace App\Services;

class ModernStrategy extends AlgorithmAbstract
{
}

About

smart-algorithm


Languages

Language:HTML 54.4%Language:PHP 36.9%Language:Blade 6.2%Language:CSS 0.7%Language:Dockerfile 0.7%Language:JavaScript 0.6%Language:Shell 0.4%