Skip to content

alexsoft/algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Algorithms

Algorithms playground for common questions solved in PHP syntax.
In case you want to prepare yourself for a job interview - try to solve it yourself first, then have a look here.

Problems

problem solution
Dijkstra's shortest path between two nodes click
Kruskal's minimum spanning tree algorithm click
Find the square root of a number click
Binary search click
Longest increasing subsequence click
Find all permutations of array click
Finding all combinations of well-formed brackets click
Finding the powerset of a set click
Game of life click
Print all combinations of set joining click
Telephone number to words click
Find the smallest biggest number that has the same digits click
[Find the minimum insertions needed to make a word palindrome](from http://www.geeksforgeeks.org/dynamic-programming-set-28-minimum-insertions-to-form-a-palindrome/) click
String matching - Knuth Morris Pratt algorithm KMP click
Balanced Parentheses click
Quicksort algorithm click
Mergesort algorithm click
Countingsort algorithm click
Shellsort algorithm click
Knapsack problem click
Longest common subsequence problem click , click
Monty Hall Problem click
Eucliden and Extended Eucliden algorithm click
Range minimum query sparse table algorithm click

#How?
Simply run php some_file.php to execute the algorithm. At the bottom of each file there are some test samples.
example: php binary_search.php will print:
04-1.

Why?

It was inspired by ruby algorithms

Contribute

Did you find a bug? any way to do it better? please feel free to pull-request it :)

About

Algorithms playground

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages