checkin heap and bst