various tree algorithms in various languages