摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2019-04-24 17:07 小白兔云 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. Example 1: Example 2: 题目大意: 返回[m 阅读全文
posted @ 2019-04-24 15:38 小白兔云 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
posted @ 2019-04-24 15:02 小白兔云 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example 阅读全文
posted @ 2019-04-24 14:54 小白兔云 阅读(86) 评论(0) 推荐(0) 编辑