TanX的博客

逼自己优秀,然后骄傲的生活

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 in...

2018-05-27 18:15:11

阅读数:15

评论数:0

LeetCode-Jewels_and_Stones

题目:You're given strings J representing the types of stones that are jewels, and S representing the stones you have.  Each character in Sis a type of ...

2018-05-25 15:33:46

阅读数:19

评论数:0

LeetCode-Heaters

题目:   Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses.Now, you are g...

2018-05-25 15:03:31

阅读数:18

评论数:0

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 horizontall...

2018-05-24 15:29:27

阅读数:18

评论数:0

LeetCode-Hamming_Distance

题目:The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, cal...

2018-05-24 14:57:42

阅读数:15

评论数:0

LeetCode-Repeated_Substring_Pattern

题目:Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You m...

2018-05-23 17:01:43

阅读数:6

评论数:0

LeetCode-Poor_Pigs

题目:There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poi...

2018-05-23 13:28:59

阅读数:22

评论数:0

LeetCode-Assign_Cookies

题目:Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has...

2018-05-23 11:02:40

阅读数:7

评论数:0

LeetCode-Minimum_Moves_to_Equal_Array_Elements

题目:Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementin...

2018-05-22 19:25:31

阅读数:10

评论数:0

LeetCode-Find_All_Numbers_Disappeared_in_an_Array

题目:Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, ...

2018-05-21 16:07:45

阅读数:6

评论数:0

leetCode-Number_of_Boomerangs

题目:Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance ...

2018-05-21 14:56:31

阅读数:11

评论数:0

LeetCode-String_Compression

题目:Given an array of characters, compress it in-place.The length after compression must always be smaller than or equal to the original array.Every e...

2018-05-17 13:19:18

阅读数:10

评论数:0

LeetCode-Arranging_Coins

题目:You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins.Given n, find the total num...

2018-05-17 10:07:07

阅读数:11

评论数:0

LeetCode-Find_All_Anagrams_in_a_String

题目:Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.Strings consists of lowercase English letters only and ...

2018-05-16 15:00:05

阅读数:11

评论数:0

LeetCode-Path_Sum_III

题目:You are given a binary tree in which each node contains an integer value.Find the number of paths that sum to a given value.The path does not need...

2018-05-16 11:26:37

阅读数:8

评论数:0

LeetCode-Number_of_Segments_in_a_String

题目:Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters.Please note that the stri...

2018-05-15 14:48:43

阅读数:19

评论数:0

LeetCode-Add_Strings

题目:Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2.Note:The length of both num1 and num2 is &...

2018-05-15 14:16:54

阅读数:10

评论数:0

LeetCode-Third_Maximum_Number

题目:Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time comp...

2018-05-15 10:58:07

阅读数:12

评论数:0

LeetCode-Fizz_Buzz

题目: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 nu...

2018-05-15 09:59:54

阅读数:10

评论数:0

LeetCode-Longest_Palindrome

题目:Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters.T...

2018-05-14 15:49:01

阅读数:10

评论数:0

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