- 博客(7)
- 收藏
- 关注
原创 LeetCode题解:Island Perimeter
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 completel
2017-02-05 10:03:23 678
原创 LeetCode题解:Arithmetic Slices
A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same.For example, these are arithmetic sequenc
2017-02-04 19:21:14 656
原创 LeetCode题解:FizzBuzz
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 “Buzz”.
2017-02-04 18:13:22 681
原创 LeetCode题解:Counting Bits
Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.Example:For num = 5
2017-02-04 18:06:58 441
原创 LeetCode题解:Battleships in a Board
Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may assume the following rules:You receive a valid
2017-02-04 17:47:19 478
原创 LeetCode题解: Number Complement
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 range
2017-02-04 17:21:06 539
原创 LeetCode题解:Teemo Attacking
In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the poisoning tim
2017-02-04 15:59:23 445
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人