Skip to content

Instantly share code, notes, and snippets.

View rvivek's full-sized avatar

Vivek Ravisankar rvivek

View GitHub Profile
@rvivek
rvivek / AWS-credit
Created February 4, 2013 18:12
How to redeem the $100 AWS credit for HackerRank's back-to-school hackathon
These AWS service credits are good for $100 worth of AWS services until February 28, 2014. Please follow the instructions below to sign up for Amazon Web Services and redeem your promotional code.
Additional rules of use: http://aws.amazon.com/awscredits/.
**Please note that credits do NOT apply towards reserved instances.**
Step 1: Sign up for AWS (if you are already signed up, skip to Step 2)
·Navigate to aws.amazon.com to learn about AWS and click on the “Sign Up” button or sign up directly using this link:https://aws-portal.amazon.com/gp/aws/developer/registration/index.html. The sign-up process requires a credit card which will not be charged until your usage exceeds the credit amount.
Step 2: Redeem your AWS credits
@rvivek
rvivek / sudoku
Created December 9, 2012 20:52
sudoku
4 1 5 2 3 9 6 7 8
2 6 7 1 4 8 3 5 9
3 8 9 5 7 6 1 4 2
5 4 8 3 1 2 7 9 6
6 2 1 8 9 7 5 3 4
7 9 3 6 5 4 8 2 1
1 5 2 4 6 3 9 8 7
8 7 6 9 2 5 4 1 3
9 3 4 7 8 1 2 6 5
1 3 4 2 5 6 8 7 9
@rvivek
rvivek / gameplay
Created November 11, 2012 14:15
Sample game play
$challenge 10
Game initialized with 10 balls
$oracle 1 2
FALSE
$oracle 2 3
TRUE
$max 1
@rvivek
rvivek / mvhackers
Created June 5, 2012 04:15
Hackers in Mountain view
TL; DR: Interviewstreet's hiring awesome programmers to join our fast growing startup team. Ping us if you're interested!
I'm basically a programmer and don't know to write sugar-coated job descriptions (rockstars/ninjas,etc) like others.
The goal might sound ambitious but we're building the Facebook for programmers - an addictive place where programmers hang out, solve interesting challenges, contribute puzzles thereby building THE place for programmers to spend time on the web. Of course, we'll connect them to awesome companies (which is natural), but when we build this great place for programmers, the extensions and possibilities are endless.
------------------------------------------------------------------------------------
Working style:
@rvivek
rvivek / mergesort.cc
Created May 7, 2012 01:40
Merge Sort
#include <iostream>
#define REP(i,N) for( int i = 0;i < N;i++ )
using namespace std;
//Function Declarations
void mergeSort(int numbers[], int temp[], int array_size);
void m_sort(int numbers[], int temp[], int left, int right);
void merge(int numbers[], int temp[], int left, int mid, int right);
int main(){
@rvivek
rvivek / insertionsort.cc
Created May 7, 2012 01:32
Insertion sort
#include <iostream>
#define REP(i,N) for ( int i = 0;i < N;i++ )
using namespace std;
int main(){
int N; cin >> N; // size of the array
int * ar = new int [N];
@rvivek
rvivek / dotsandboxes.cc
Created May 7, 2012 00:29
Dots and Boxes
#include<iostream>
using namespace std;
#define odd(x) (x&1)
#define even(x) (!(x&1))
int main(){
int x;
cin >> x;
@rvivek
rvivek / antichess.cpp
Created May 7, 2012 00:28
Anti-chess sample code snippet
#include<iostream>
#include<sstream>
#include<vector>
#include<algorithm>
#include<math.h>
using namespace std;
struct MoveResult{
int status;
@rvivek
rvivek / Hiring programmers
Created April 29, 2012 09:16
Hiring programmers
TL; DR: Interviewstreet's hiring awesome programmers to join our fast growing startup team. Ping us if you're interested!
I'm basically a programmer and don't know to write sugar-coated job descriptions (rockstars/ninjas,etc) like others.
The goal might sound ambitious but we're building the Facebook for programmers - an addictive place where programmers hang out, solve interesting challenges, contribute puzzles thereby building THE place for programmers to spend time on the web. Of course, we'll connect them to awesome companies (which is natural), but when we build this great place for programmers, the extensions and possibilities are endless.
------------------------------------------------------------------------------------
Working style:
@rvivek
rvivek / gist:2330923
Created April 7, 2012 17:59
Collaborative Campus Challenge
--Rules of the contest
There are three problems
a) Dots and Boxes (http://en.wikipedia.org/wiki/Dots_and_Boxes)
b) Anti-Chess (http://en.wikipedia.org/wiki/Antichess)
c) Fake-Album-cover
How the contest work?
The idea of the contest is to pick the best performing school and encourage people to work in teams. There are schools that have over 50 people participating and hence it doesn't make sense to have just one team per school. You can team up with whoever you want and submit solutions (Ensure you fill up your school name, else your entry is invalid). The leaderboard will have a separate column containing the school you represent.