摘要: Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorithm s 阅读全文
posted @ 2016-09-23 11:09 咖啡中不塌缩的方糖 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty. Example:Given bi 阅读全文
posted @ 2016-09-23 05:16 咖啡中不塌缩的方糖 阅读(516) 评论(0) 推荐(0) 编辑
摘要: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
posted @ 2016-09-23 03:41 咖啡中不塌缩的方糖 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in 阅读全文
posted @ 2016-09-23 02:32 咖啡中不塌缩的方糖 阅读(120) 评论(0) 推荐(0) 编辑