Skip to content

Instantly share code, notes, and snippets.

View emcfarlane's full-sized avatar
👨‍🚀
Nominal

Edward McFarlane emcfarlane

👨‍🚀
Nominal
View GitHub Profile
// counter is a chunked firestore counter.
type counter struct {
id string
sync.Mutex
value big.Int
limit big.Int
}
type Counter struct {
ID string
// https://www.janestreet.com/puzzles/triads/
package main
import (
"context"
"fmt"
"strings"
"time"
)
@emcfarlane
emcfarlane / pair_sum_bst.py
Created January 13, 2017 15:05
Pair Sum Binary Search Tree
from collections import deque
class Node(object):
def __init__(self, value, left=None, right=None):
self.value = value
self.left = left
self.right = right