摘要: Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Example Example 1: Input: {1} 0.0000 阅读全文
posted @ 2020-03-26 09:52 xuan_abc 阅读(236) 评论(0) 推荐(0)
摘要: Given a binary search tree and a node in it, find the in-order predecessor of that node in the BST. Example Example1 Input: root = {2,1,3}, p = 1 Outp 阅读全文
posted @ 2020-03-26 08:38 xuan_abc 阅读(256) 评论(0) 推荐(0)
摘要: On a 3x3 board, there are 8 tiles represented by the integers 1 through 8, and an empty square represented by 0. A move consists of choosing 0 and a 4 阅读全文
posted @ 2020-03-26 03:52 xuan_abc 阅读(395) 评论(0) 推荐(0)
摘要: You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rota 阅读全文
posted @ 2020-03-26 03:04 xuan_abc 阅读(182) 评论(0) 推荐(0)