Leetcode
文章平均质量分 68
lauraliu123
这个作者很懒,什么都没留下…
展开
-
Leetcode Two Sum
希望能坚持每天做些题 :>Day11、Two Sum给定一个整形数组,返回加在一起的和等于目标值的两个数在数组中的位置。你可以假设每个输入均只有一个特定的输出,并且你不能使用同一个元素两次。示例:给定数组 nums = [2, 7, 11, 15],target = 9,因为 nums[0] + nums[1] = 2 + 7 = 9,故返回 [0, 1]基本思路有二:1、时间复杂度为O(...原创 2018-05-25 22:43:11 · 164 阅读 · 0 评论 -
Leetcode Add Two Numbers
Day2懒得翻译了 :0You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers ...原创 2018-05-27 09:16:24 · 194 阅读 · 0 评论 -
LeetCode Longest Substring Without Repeating Characters
Day 3 以下题目直接来源于LeetCodeGiven a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the an...原创 2018-06-02 00:03:10 · 103 阅读 · 0 评论 -
LeetCode Median of Two Sorted Arrays
Day 4以下题目直接来源于LeetCodeThere are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example ...原创 2018-06-02 00:09:21 · 120 阅读 · 0 评论 -
Leetcode Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1:Input: "babad"Output: "bab"Note: "aba" is also a valid answer....原创 2018-07-03 23:39:56 · 226 阅读 · 0 评论 -
leetcode 375 Guess Number Higher or Lower II
leetcode 375 原题描述We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I'll tell you whether the ...原创 2019-07-15 17:19:04 · 124 阅读 · 0 评论