摘要: Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Input: 1 \ 3 / 2 O 阅读全文
posted @ 2017-02-28 20:26 amazingzoe 阅读(606) 评论(0) 推荐(0) 编辑
摘要: Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of 阅读全文
posted @ 2017-02-28 20:13 amazingzoe 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Shuffle a set of numbers without duplicates. Example: 阅读全文
posted @ 2017-02-28 20:01 amazingzoe 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t 阅读全文
posted @ 2017-02-28 18:05 amazingzoe 阅读(326) 评论(0) 推荐(0) 编辑
摘要: Let's play the minesweeper game (Wikipedia, online game)! You are given a 2D char matrix representing the game board. 'M' represents an unrevealed min 阅读全文
posted @ 2017-02-28 17:38 amazingzoe 阅读(257) 评论(0) 推荐(0) 编辑