摘要: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. Note: If the given node has no in-order successor in 阅读全文
posted @ 2018-03-28 08:29 轻风舞动 阅读(650) 评论(0) 推荐(1) 编辑
摘要: Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the sam 阅读全文
posted @ 2018-03-28 08:13 轻风舞动 阅读(1219) 评论(0) 推荐(0) 编辑
摘要: Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation -- it e 阅读全文
posted @ 2018-03-28 07:15 轻风舞动 阅读(410) 评论(0) 推荐(0) 编辑
摘要: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k num 阅读全文
posted @ 2018-03-28 06:08 轻风舞动 阅读(1323) 评论(0) 推荐(0) 编辑
摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Example 2: Follow up: A straight forward solu 阅读全文
posted @ 2018-03-28 02:38 轻风舞动 阅读(521) 评论(0) 推荐(0) 编辑
摘要: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John 阅读全文
posted @ 2018-03-28 02:19 轻风舞动 阅读(1027) 评论(0) 推荐(0) 编辑
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2018-03-28 01:50 轻风舞动 阅读(1223) 评论(0) 推荐(0) 编辑