Data structures and algorithm implementations that may be useful