Ruby Tree Implementation