limuyao's blog


  • 首页

  • 分类

  • 归档

  • 标签

  • 搜索

LeetCode-003.Longest Substring Without Repeating Characters

发表于 2017-07-22 | 分类于 LeetCode | | 阅读次数

题目描述:

Given 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 answer is “b”, with the length of 1.
Given “pwwkew”, the answer is “wke”, with the length of 3.
Note that the answer must be a substring, “pwke” is a subsequence and not a substring.

阅读全文 »

LeetCode-002.Add Two Numbers

发表于 2017-07-22 | 分类于 LeetCode | | 阅读次数

题目描述:

You 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 and return it as a linked list.

You may assume the two numbers do not contain any leading zero, except the number 0 itself.
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Output: 7 -> 0 -> 8

阅读全文 »

LeetCode-001.Two Sum

发表于 2017-07-22 | 分类于 LeetCode | | 阅读次数

题目描述:

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 element twice.

Examples:

1
2
3
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].

阅读全文 »

Hello World

发表于 2017-03-15 | | 阅读次数

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"
阅读全文 »
神小渣

神小渣

昨夜西风凋碧树,独上高楼,望尽天涯路。

4 日志
1 分类
2 标签
GitHub 知乎
© 2017 神小渣
由 Hexo 强力驱动
主题 - NexT.Pisces