Skip to content

Instantly share code, notes, and snippets.

View mourjo's full-sized avatar
👋

Mourjo Sen mourjo

👋
View GitHub Profile
@mourjo
mourjo / hash.py
Created August 23, 2016 02:56
Custom Hashmap
class bst:
def __init__(self, k, v):
self.left = None
self.right = None
self.v = v
self.k = k
self.size = 1
def __str__(self):
# for debugging only
@mourjo
mourjo / TravellingSalesman.java
Created July 18, 2016 18:59
Travelling Salesman (Simple Brute Force Algorithm)
import java.awt.Point;
import java.awt.geom.Point2D;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
public class TravellingSalesman {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader (new InputStreamReader (System.in));