Algorithms playground for common questions solved in Python. In case you want to prepare yourself for a job interview - try to solve it yourself first, then have a look here.
This is a fork of this project. I'm working through it in preparation for technical interviews. Each .rb
file without a corresponding .py
file is essentially an open ticket.
- Dijkstra's shortest path between two nodes
- Find the square root of a number
- Binary search
- Longest increasing subsequence
- Find all permutations of array
- Finding all combinations of well-formed brackets
- Finding the powerset of a set
- Game of life
- Print all combinations of set joining
- Telephone number to words
- Find the smallest biggest number that has the same digits
- [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/)
- String matching - Knuth Morris Pratt algorithm KMP
- Quicksort algorithm
- Mergesort algorithm
- Knapsack problem
- Longest common subsequence problem
#How?
Simply run python some_file.py
to execute the algorithm. At the bottom of each file there are some test samples.
example: python brackets_combinations.py
will print:
["((()))", "(()())", "(())()", "()(())", "()()()"]
.