leetcode
鱼香土豆丝
土豆丝很好吃
展开
-
leetcode记录1
这是一道soeasy的题目 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. 给一个数组和目标值,数原创 2016-09-14 10:17:22 · 272 阅读 · 0 评论 -
Find All Numbers Disappeared in an Array
简单的Leetcode题目Given an unsorted integer array, find the first missing positive integer.For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and uses consta原创 2017-09-12 17:01:05 · 236 阅读 · 0 评论 -
461. Hamming Distance
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.原创 2017-09-13 09:02:53 · 230 阅读 · 0 评论 -
Keyboard Row
题目是这样的:Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.给出一系列的单词,判断这些单词是否出自键盘的同一行(忽略大小写) 键盘就是标准的美式键盘:原创 2017-09-21 21:03:44 · 230 阅读 · 0 评论 -
Complex Number Multiplication
You need to return a string representing their multiplication. Note i2 = -1 according to the definition.用一个字符串表示一个复数,并且其中的i2=−1i^2=-1原创 2017-10-05 11:56:12 · 301 阅读 · 0 评论 -
Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two l原创 2017-10-20 22:37:37 · 281 阅读 · 0 评论