摘要: 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-09-03 07:58 白常福 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2017-09-03 07:43 白常福 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two di 阅读全文
posted @ 2017-09-03 07:29 白常福 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtime complex 阅读全文
posted @ 2017-09-03 07:14 白常福 阅读(150) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2017-09-03 06:41 白常福 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi 阅读全文
posted @ 2017-09-03 06:29 白常福 阅读(132) 评论(0) 推荐(0) 编辑