• Stars
    star
    3,264
  • Rank 13,760 (Top 0.3 %)
  • Language
    Ruby
  • Created about 10 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

algorithms playground for common questions

Algorithms

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

Why?

I interviewed with Google, Facebook, LinkedIn, Twitter and others. I also interviewed others myself. Sometimes it looks like they all ask you the same "out of the box" questions that don't really check knowledge but memorization of the same tricks. This is my way of saying - change your interview style. There are lots of smart people out there, this is not the best way to find them.

Problems

problem solution
Unique binary search trees click
House Robber click
Decode Ways click
Coin change click
Decode Strings click
Wiggle Subsequence click
Binary Tree Side View click
Unix path click
Array Product click
Top K Frequent Elements click
Sum 4 arrays click
Reverse Linked List click
Reverse String In-place click
Nested List Weight Sum II click
Symmetric Tree click
Dijkstra's shortest path between two nodes click
Kruskal's minimum spanning tree algorithm click
Find the square root of a number click
Add two binary numbers 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
count and say click
Telephone number to words click
Maximum contiguous subarray click
Max Stack click
Find the smallest biggest number that has the same digits click
Find the minimum insertions needed to make a word palindrome click
String matching - Knuth Morris Pratt algorithm KMP click
Balanced Parentheses click
Quicksort algorithm click
Mergesort algorithm click
Max Stocks Profit click
Countingsort algorithm click
Shellsort algorithm click
Knapsack problem click, click
Move Zeroes click
Longest common subsequence problem click , click
Monty Hall Problem click
Eucliden and Extended Eucliden algorithm click
Suggest index of a number in an array click
Range minimum query sparse table algorithm click
Insertion Sort click
Towers of Hanoi using Stack click
Tarjan's strongly connected components finder click

How?

Simply run ruby some_file.rb to execute the algorithm. At the bottom of each file there are some test samples.
example: ruby brackets_combinations.rb will print:
["((()))", "(()())", "(())()", "()(())", "()()()"].

Contribute

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

More Repositories

1

accept-bitcoin

Accept bitcoin payments using Node.js
CoffeeScript
159
star
2

StockStalk

Robinhood on Desktop
JavaScript
52
star
3

Unity2d-Game

Unity2d Game Sample Template
C#
19
star
4

solidity-utils

solidity utils to make your life easier
JavaScript
16
star
5

nodejs-addons

calling native c++ from nodejs
C++
15
star
6

go-benchmark

benchmarking things in go, for performance freaks.
Go
11
star
7

dead-simple-crypt

simply encrypt and decrypt things
JavaScript
9
star
8

robinhood-node

💹 Trade stocks for free using your Robinhood account
JavaScript
7
star
9

Ruby-Javascript

Make your life easy - add lots of ruby-like methides to your javascript language.
JavaScript
6
star
10

emoji-domain-checker

check if your favorite emoji-domain is avaialble
JavaScript
6
star
11

node-coffeescript-express-mongoose-rest-api

a quick MVC skeleton for creating a RESTful server using express.js and mongoose
CoffeeScript
6
star
12

timeago-words

node.js time ago functionality to display time ago in words
CoffeeScript
4
star
13

slack-overflow

launch hackathon 2015
HTML
4
star
14

fixed-table-header

allow you to make constat header for tables
4
star
15

powerset

ruby implementation for finding the powerset of set.
Ruby
3
star
16

shutup

chrome extention for content censorship
CoffeeScript
2
star
17

ggj2015

C#
2
star
18

jQuery-Watermark

small and easy watermark creator for inputs
2
star
19

rnn-cartpole

using RNN to play CartPole on Keras and openai Gym
Python
1
star
20

gitconfig

git shortcut to make your life better
1
star
21

react-chrome-extentaion-template

a basic template for using react apps on chrome extantion
JavaScript
1
star
22

pong-client

client side pong game in Unity3D
C#
1
star
23

unity-vr-hackathon

C#
1
star
24

simple-chat-room

experimatal webRTC chatroom using node, express and socket.io
JavaScript
1
star