construct complete binary search, solve it perfectly, really good