摘要: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target.ExampleGiven root = {1}, target = 4.4 阅读全文
posted @ 2018-08-31 13:13 jasminemzy 阅读(250) 评论(0) 推荐(0) 编辑
摘要: Find K-th largest element in an array.ExampleIn array [9,3,2,4,8], the 3rd largest element is 4.In array [1,2,3,4,5], the 1st largest element is 5, 2n 阅读全文
posted @ 2018-08-31 06:12 jasminemzy 阅读(231) 评论(0) 推荐(0) 编辑