tree heap and set