- 博客(8)
- 收藏
- 关注
原创 104. Maximum Depth of Binary Tree
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 leaf node
2017-12-11 16:47:08 502
原创 485. Max Consecutive Ones
Problem StatementGiven 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 digits or the last three digits are
2017-12-11 16:45:35 471
原创 136. Single Number
Problem StatementGiven an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it witho
2017-12-11 16:40:28 431
原创 292. Nim Game
Problem StatementYou 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 stones. The one who removes the last s
2017-12-11 16:32:22 452
原创 521. Longest Uncommon Subsequence I
Problem StatementGiven a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defined as the longest subsequence of
2017-12-11 16:29:34 444
原创 496. Next Greater Element I
Problem StatementYou are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1’s elements in the corresponding pl
2017-12-11 16:25:00 435
原创 412. Fizz Buzz
Problem StatementWrite a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five out
2017-12-11 16:14:52 230
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人