Skip to content

Instantly share code, notes, and snippets.

View vmayakumar's full-sized avatar

Mayakumar Vembunarayanan vmayakumar

View GitHub Profile
package com.algorithms;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class NQueen {
class Position {
int row;
int col;
@vmayakumar
vmayakumar / Redux.js
Last active January 20, 2017 16:34
Redux js
function compose(...funcs) {
funcs = funcs.filter(func => typeof func === 'function')
if (funcs.length === 0) {
return arg => arg
}
if (funcs.length === 1) {
return funcs[0]
}
@vmayakumar
vmayakumar / Redux.java
Last active January 20, 2017 16:34
Redux Java
class Action {
private String type;
private Object data;
public Action(String type, Object data) {
this.type = type;
this.data = data;
}
public String getType() {