![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeeCode
文章平均质量分 64
小皮皮瓜
这个作者很懒,什么都没留下…
展开
-
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 us原创 2017-04-29 22:47:42 · 140 阅读 · 0 评论 -
Reshape the Matrix
题目描述: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. You're given a matrix represented b原创 2017-05-09 20:09:27 · 396 阅读 · 0 评论 -
Distribute Candies
描述: Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distrib原创 2017-05-09 19:30:40 · 310 阅读 · 0 评论 -
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. Not原创 2017-05-09 18:55:49 · 261 阅读 · 0 评论 -
Reverse String
Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". Subscribe to see which companies asked this question. 点击打开链接 简原创 2017-05-17 14:11:37 · 153 阅读 · 0 评论 -
Array Partition I
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large a原创 2017-05-08 16:25:11 · 226 阅读 · 1 评论 -
Fizz Buzz
Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”.原创 2017-05-16 13:08:18 · 251 阅读 · 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. Example 1: Input: ["Hello", "Alaska", "Da原创 2017-05-15 23:32:45 · 205 阅读 · 0 评论 -
Longest Substring Without Repeating Characters
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 "原创 2017-05-05 15:42:38 · 143 阅读 · 0 评论 -
Number Complement
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given integer is guaranteed to fit within the range of原创 2017-05-11 10:39:44 · 161 阅读 · 0 评论 -
Add Two Numbers
题目描述: 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 a原创 2017-05-01 21:58:22 · 170 阅读 · 0 评论 -
Reverse Words in a String III
题目描述: Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. Example 1: Input: "Let's take Leet原创 2017-05-10 10:17:46 · 213 阅读 · 0 评论