自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 [Leetcode] 485. Max Consecutive Ones

Description:Given a binary array, find the maximum number of consecutive 1s in this array.Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are...

2018-07-30 15:17:02 185

原创 [Leetcode] 226. Invert Binary Tree

Description:Invert a binary tree.Example:Input: 4 / \ 2 7 / \ / \1 3 6 9Output: 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired ...

2018-07-30 14:35:46 114

原创 [Leetcode] 824. Goat Latin

Description:A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only.We would like to convert the sentence to "Goat Latin" (a made-u...

2018-07-27 15:42:27 194

原创 [Leetcode] 292. Nim Game

Description: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 stones. The one who removes the last sto...

2018-07-27 14:07:26 157

原创 [Leetcode] 762. Prime Number of Set Bits in Binary Representation

Description:Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary representation.(Recall that the number of set bi...

2018-07-27 13:40:16 174

原创 [Leetcode] 521. Longest Uncommon Subsequence I

Description: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 defined as the longest subsequence of on...

2018-07-26 16:09:20 166

原创 [Leetcode] 104. Maximum Depth of Binary Tree

Description: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.Note: A leaf is a node w...

2018-07-26 14:40:35 119

原创 [Leetcode] 693. Binary Number with Alternating Bits

Description:Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values.Example 1:Input: 5Output: TrueExplanation:The bina...

2018-07-26 13:58:41 156

原创 [Leetcode] 637. Average of Levels in Binary Tree

Description:Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.Example 1:Input: 3 / \ 9 20 / \ 15 7Output: [3, 14.5,...

2018-07-25 16:32:51 122

原创 [Leetcode] 136. Single Number

DescriptionGiven a non-empty 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 ...

2018-07-25 14:59:00 94

原创 [Leetcode] 496. Next Greater Element I

Description:You 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 places...

2018-07-02 13:23:38 149

原创 [Leetcode] 412. Fizz Buzz

Description:Write 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 output ...

2018-06-29 09:58:02 157

原创 [Leetcode] 575. Distribute Candies

Description:Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to dist...

2018-06-28 11:37:48 147

原创 [Leetcode] 463. Island Perimeter

Description:You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is...

2018-06-27 10:31:37 104

原创 [Leetcode] 811.Subdomain Visit Count

Description:A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "leetcode.com", and at the lowest level, "discuss.l...

2018-06-25 14:22:20 173 1

原创 [Leetcode] 476. Number Complement

Description:Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer is guaranteed to fit within the rang...

2018-06-25 14:21:36 193

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除