Skip to content

Instantly share code, notes, and snippets.

View le-doude's full-sized avatar

Ed Pelosi le-doude

View GitHub Profile
@le-doude
le-doude / Solver.java
Last active August 29, 2015 14:02
Solves the problem: "Given an origin and a destination on an empty chessboard, count how many moves are necessary for the rook to go from one to the other."
package org.rooksolver;
/**
* Created by le-doude on 14/06/16.
*/
public class Solver {
static final byte[][] moves = new byte[64][64];
package arrayexperiment;
import org.apache.commons.lang.ArrayUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
/**
@le-doude
le-doude / Dijkstra.java
Created August 5, 2013 12:33
Self study: self contained Dijkstra implementation
import java.util.*;
/**
* Created with IntelliJ IDEA.
* Author: Edouard
*/
public class Dijkstra {
public static class Vertex implements Comparable<Vertex> {
private final String label;