Skip to content

Instantly share code, notes, and snippets.

View finaiized's full-sized avatar

Dominic Kuang finaiized

View GitHub Profile
@finaiized
finaiized / union-find.py
Created June 15, 2014 03:04
Implements various algorithms for union find, based on Algorithms, Part I
class QuickFind(object):
"""
Implements the quick find algorithm for the dynamic connectivity problem
Cost model (in array read/writes):
Initialization: N
Union: N
Find: 1
Algorithm:
@finaiized
finaiized / code.js
Created April 28, 2012 22:05
Simple example of using Backbone Model, Collection and Views in conjunction with Underscore templating.
$(document).ready(function() {
var Meal = Backbone.Model.extend({
defaults: {
"appetizer": "Caesar Salad",
"entree": "Ravioli",
"dessert": "Cheesecake"
}
});
var Meals = Backbone.Collection.extend({
@finaiized
finaiized / projecteuler11.cs
Created April 21, 2012 22:57
The simple solution to problem 11 of Project Euler.
using System;
using System.IO;
namespace ProjectEuler11
{
class Program
{
static void Main(string[] args)
{
const int NUMBER_OF_ELEMENTS = 20;