Skip to content

Instantly share code, notes, and snippets.

View arunsivasankaran's full-sized avatar

Arun Sivasankaran arunsivasankaran

View GitHub Profile

Keybase proof

I hereby claim:

  • I am arunsivasankaran on github.
  • I am arunparthiban (https://keybase.io/arunparthiban) on keybase.
  • I have a public key ASBkWMhGop0HqX4YetpmEFKr6yfgChEyRgIvb4dZQYfQNQo

To claim this, I am signing this object:

@arunsivasankaran
arunsivasankaran / course-hero-linkdlist.js
Last active August 29, 2015 14:13
Course Hero LinkdList Solution.
/*
input: A -> B -> C -//
output: C -> B -> A -//
*/
var LinkdList = function (item) {
this.name = item;
this.next = null;
};
@arunsivasankaran
arunsivasankaran / gist:f2c729e0e601507c5654
Created January 15, 2015 22:02
Casper Takehome challenge
https://docs.google.com/document/d/1uQ4Gm9GKta30jboySkCB-rhdtRImnuN57IJbzIiquFw/pub
Casper Coding Challenge
Below are the results when you google image search “penrose”. Your challenge is to re-create the following screenshot as a standalone HTML page (you may use any set of images you want):
https://lh6.googleusercontent.com/z06INIa9oIrBqkkdGNySuOxku3je2xO1bsf9pBpHwVsmRYSEcDQQJdvzAWNiHWLP0_UygUFFSfpvM3m-hCu2MnDUP4MWbuHJUbO8CNs8W80286szX-Et2vV_eCMjbPAlnw
You should pull down images via API from any image hosting service you want — we’ve included an example of pulling down from Flickr below. You may use jQuery or vanilla JS, but no other external libraries. (You could use coffeescript if you wanted, too!)
You can use plain CSS or SASS.
You cannot alter the aspect ratio of any images, but you may crop them, or hide the edges, as you see fit.
The page should be fully responsive, and emulate the behavior of google images to an extent. Here is an example of a mobile search for “NYC”:
https://lh3.googleuserconte
Front-end Take-Home Assignment:
BAM's clients need to look and analyze key performance metrics.
Create a standalone page in Angular/JavaScript. Use any additional libraries you like.
1. Display 5 key metrics in the layout of your choice
· Impressions: 103,706
· Clicks: 3,111
· Click through rate: 3.0%
@arunsivasankaran
arunsivasankaran / gist:eb8168cc67f6794471bb
Created January 15, 2015 21:57
Hired.com Questions
1) check whether two words are anagrams
2) check whether an expressions opening and closing braces match
3) you have an array of numbers. you want this array of numbers to be in ascending order. consider a number d. you can add/subtract any number in your array by any number <= d. what is the smallest d you could use to make the array ascending? (my hint: think worst case)
4) you have an array of numbers. find the subarray of a given length that has the biggest max-min difference. eg. you have an array of size 10, and you want to find the subarray of size 3 that has the biggest max-min difference.
5) something along these lines. you have an array. you can break the array into various pairs of non-overlapping subarrays. consider one of these pairs. each subarray in the pair has a max value. the pair can have a property that holds the difference between each sub's max. lets call that property subDiff. find the pair with the biggest subDiff. (I ran out of time, but I could have done it!)
I had 90 minutes to ans
@arunsivasankaran
arunsivasankaran / User.model.js
Created January 6, 2015 19:05
User Model for LearnDot
'use strict';
var mongoose = require('mongoose');
var _ = require('lodash');
var extend = require('mongoose-schema-extend');
var Schema = mongoose.Schema;
var crypto = require('crypto');
var Sms = require('../../remote/sms')
var authTypes = ['github', 'twitter', 'facebook', 'google'];
@arunsivasankaran
arunsivasankaran / simple-dd.js
Created November 19, 2014 16:30
Simple Drag and Drop
var Module = angular.module('simple-drag-drop', []);
Module.directive('draggable', function(draggingStudent) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.draggable({
revert: "invalid",
helper:"clone",
start: function() {