关闭

[LeetCode]2. Add Two Numbers&67. Add Binary

2. Add Two Numbers 67. Add Binary...
阅读(110) 评论(0)

[LeetCode]15. 3Sum【&16. 3Sum Closest】

15. 3Sum 16. 3Sum Closest...
阅读(124) 评论(0)

[LeetCode]409. Longest Palindrome

EasyGiven a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters.This is case sensitive, for example “Aa” is not cons...
阅读(113) 评论(0)

[LeetCode]39.Combination Sum&40.Combination Sum II&216.Combination Sum III&377.Combination Sum IV

39.Combination Sum 40.Combination Sum II 216.Combination Sum III 377.Combination Sum IV...
阅读(145) 评论(0)

[LeetCode]223. Rectangle Area

Easy Find the total area covered by two rectilinear rectangles in a 2D plane.Each rectangle is defined by its bottom left corner and top right corner as shown in the figure.Rectangle Area Assume that...
阅读(92) 评论(0)

[LeetCode]400. Nth Digit

EasyFind the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, …Note: n is positive and will fit within the range of a 32-bit signed integer (n < 231).Example 1:Input: 3Ou...
阅读(102) 评论(0)

[LeetCode]38. Count and Say

EasyThe count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, …1 is read off as “one 1” or 11. 11 is read off as “two 1s” or 21. 21 is read off as “one 2,...
阅读(67) 评论(0)

[LeetCode]7. Reverse Integer&190. Reverse Bits

7. Reverse Integer 190. Reverse Bits...
阅读(96) 评论(0)

[LeetCode]189. Rotate Array

EasyRotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note: Try to come up as many solutions as you can,...
阅读(87) 评论(0)

[LeetCode]343. Integer Break

MediumGiven a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example, given n = 2, re...
阅读(77) 评论(0)

[LeetCode]144. Binary Tree Preorder Traversal&94. Binary Tree Inorder Traversal

144. Binary Tree Preorder Traversal 94. Binary Tree Inorder Traversal...
阅读(88) 评论(0)

[LeetCode]318. Maximum Product of Word Lengths

MediumGiven a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that each word will contain only lower case...
阅读(137) 评论(0)

[LeetCode]238. Product of Array Except Self

MediumGiven an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without division and in O(n)...
阅读(71) 评论(0)

[LeetCode]204. Count Primes

EasyDescription:Count the number of prime numbers less than a non-negative number, n.超时: public int countPrimes(int n) { int[] primes = new int[n/2+1]; int p = 0; int i = 2;...
阅读(78) 评论(0)

[LeetCode]58. Length of Last Word

EasyGiven a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string.If the last word does not exist, return 0.Note: A word is define...
阅读(98) 评论(0)
66条 共5页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:15120次
    • 积分:272
    • 等级:
    • 排名:千里之外
    • 原创:4篇
    • 转载:62篇
    • 译文:0篇
    • 评论:1条
    文章分类
    最新评论