LeetCode
西唐
这个作者很懒,什么都没留下…
展开
-
LeetCode1-Two Sum
Given nums = [2, 7, 11, 15], target = 9,Because nums[0] + nums[1] = 2 + 7 = 9,return [0, 1].题目:给定一数组,输出满足条件的数组下标,实现的思想比较简单,先实现排序,然后采用start、end下标遍历满足条件的下标。/* * time:2016-7-25 22:08:24 * lo原创 2016-07-25 23:46:51 · 617 阅读 · 0 评论 -
LeetCode3.lengthOfLongestSubstring
找给定字符串中最大的不同字符的子串Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b", with the length of 1.Given "pwwkew", the answer is "wke", with the length of 3.原创 2016-07-28 16:01:29 · 2082 阅读 · 2 评论 -
线性表-26.Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only onceand return the new length.Do not allocate extra space for another array, you must do this in place with原创 2017-01-11 19:00:23 · 417 阅读 · 0 评论