leetcode题解
文章平均质量分 50
yangzhichao888
这个作者很懒,什么都没留下…
展开
-
leetcode--532. K-diff Pairs in an Array
532. K-diff Pairs in an Array Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an integer pair (i, j), ...原创 2018-03-08 14:33:57 · 160 阅读 · 0 评论 -
58. Length of Last Word
Given 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 defin...原创 2018-03-08 22:52:12 · 102 阅读 · 0 评论 -
53. Maximum Subarray
求最大子序列 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2,1,-5,4], the contiguous subarray [4,-1,2...原创 2018-03-11 14:28:11 · 107 阅读 · 0 评论 -
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same ...原创 2018-03-13 13:04:03 · 109 阅读 · 0 评论