doganoo/PHPAlgorithms
소개
Gayle Laakmann McDowell의 『Cracking the Coding Interview』를 바탕으로 PHP로 구현한 일반적인 알고리즘 모음입니다.
학습 및 교육측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPHPAlgorithms

A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDowell
You can find the package on Packagist: https://packagist.org/packages/doganoo/php-algorithms
Why Using PHPAlgorithms?
"Algorithms + Data Structures = Programs"
Algorithms are a part of the basic toolkit for solving problems. Data Structures organize data in an efficient way. The combination of both allow the creation of smart and efficient software.
Installation
You can install the package via composer:
composer require doganoo/php-algorithms
Usage
Here's an Binary Tree example:
use doganoo\PHPAlgorithms\Datastructure\Graph\Tree\BinaryTree;
$binaryTree = new BinaryTree();
$binaryTree->insertValue(50);
$binaryTree->insertValue(25);
$binaryTree->insertValue(75);
$binaryTree->insertValue(10);
$binaryTree->insertValue(100);
echo json_encode($binaryTree);
produces
{"nodes":{"value":50,"left":{"value":25,"left":{"value":10,"left":null,"right":null},"right":null},"right":{"value":75,"left":null,"right":{"value":100,"left":null,"right":null}}}}
Contributions
Feel free to send a pull request to add more algorithms and data structures. Please make sure that you read https://github.com/doganoo/PHPAlgorithms/wiki/Best-Practices before opening a PR. Please also consider https://github.com/doganoo/PHPAlgorithms/blob/master/CONTRIBUTING.md.
Maintainer/Creator
Doğan Uçar (@doganoo)
License
MIT
관련 프로젝트 살펴보기
불러오는 중…