All Projects → doganoo → Phpalgorithms

doganoo / Phpalgorithms

Licence: mit
A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDowell

Projects that are alternatives of or similar to Phpalgorithms

Data Structure And Algorithms
A complete and efficient guide for Data Structure and Algorithms.
Stars: ✭ 48 (-94.45%)
Mutual labels:  algorithm, algorithms, datastructures
Competitive Programming
📌 📚 Solution of competitive programming problems, code templates, Data Structures and Algorithms, hackathons, interviews and much more.
Stars: ✭ 496 (-42.66%)
Mutual labels:  algorithm, algorithms, datastructures
Algorithms And Data Structures In Java
Algorithms and Data Structures in Java
Stars: ✭ 498 (-42.43%)
Mutual labels:  algorithm, algorithms, datastructures
Awesome Java Leetcode
👑 LeetCode of algorithms with java solution(updating).
Stars: ✭ 8,297 (+859.19%)
Mutual labels:  algorithm, algorithms, datastructures
Algorithm
The repository algorithms implemented on the Go
Stars: ✭ 163 (-81.16%)
Mutual labels:  algorithm, algorithms, datastructures
Data Structures And Algorithms
Data Structures and Algorithms implementation in Go
Stars: ✭ 2,272 (+162.66%)
Mutual labels:  algorithm, algorithms, datastructures
Matlab Octave
This repository contains algorithms written in MATLAB/Octave. Developing algorithms in the MATLAB environment empowers you to explore and refine ideas, and enables you test and verify your algorithm.
Stars: ✭ 180 (-79.19%)
Mutual labels:  algorithm, algorithms, datastructures
Proalgos Cpp
C++ implementations of well-known (and some rare) algorithms, while following good software development practices
Stars: ✭ 369 (-57.34%)
Mutual labels:  algorithm, algorithms, datastructures
Algorithms and data structures
180+ Algorithm & Data Structure Problems using C++
Stars: ✭ 4,667 (+439.54%)
Mutual labels:  algorithm, datastructures
Algorithms
数据结构和算法专项训练营。✍️✍️✍️
Stars: ✭ 424 (-50.98%)
Mutual labels:  algorithms, datastructures
Algorithms
CLRS study. Codes are written with golang.
Stars: ✭ 482 (-44.28%)
Mutual labels:  algorithm, algorithms
Problem Solving Javascript
🔥 Crack you JS interviews ⚡ Collection of most common JS Interview questions with Unit Tests 🚀
Stars: ✭ 451 (-47.86%)
Mutual labels:  algorithm, datastructures
Algodeck
An Open-Source Collection of 200+ Algorithmic Flash Cards to Help you Preparing your Algorithm & Data Structure Interview 💯
Stars: ✭ 4,441 (+413.41%)
Mutual labels:  algorithm, algorithms
Go
Algorithms Implemented in GoLang
Stars: ✭ 7,385 (+753.76%)
Mutual labels:  algorithms, datastructures
Datastructure
常用数据结构及其算法的Java实现,包括但不仅限于链表、栈,队列,树,堆,图等经典数据结构及其他经典基础算法(如排序等)...
Stars: ✭ 419 (-51.56%)
Mutual labels:  algorithms, datastructures
Treelib
An efficient implementation of tree data structure in python 2/3.
Stars: ✭ 540 (-37.57%)
Mutual labels:  algorithm, datastructures
Book on python algorithms and data structure
🪐 Book on Python, Algorithms, and Data Structures. 🪐
Stars: ✭ 604 (-30.17%)
Mutual labels:  algorithm, algorithms
Cdsa
A library of generic intrusive data structures and algorithms in ANSI C
Stars: ✭ 549 (-36.53%)
Mutual labels:  algorithms, datastructures
Dsjslib
A library implementing several standard data structures and utilities, in JavaScript. Its written and tested using Node.js which is the target platform.
Stars: ✭ 707 (-18.27%)
Mutual labels:  algorithms, datastructures
Dsa.js Data Structures Algorithms Javascript
🥞Data Structures and Algorithms explained and implemented in JavaScript + eBook
Stars: ✭ 6,251 (+622.66%)
Mutual labels:  algorithm, algorithms

PHPAlgorithms

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].