![](https://img-blog.csdnimg.cn/direct/359680055c5b45f29fcaf08cb80d5d7c.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
leetcode
文章平均质量分 84
收录leetcode做题过程和思路
BerryRobot
士必有坚韧不拔之志,才有坚韧不拔之力
展开
-
leetcode 1. Two Sum
leetcode 1. Two SumQuestionGiven 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.Exampl原创 2016-12-24 10:45:17 · 476 阅读 · 0 评论 -
leetcode 2. Add Two Numbers
leetcode 2. Add Two NumbersQuestionYou 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原创 2017-01-10 09:44:52 · 305 阅读 · 0 评论 -
leetcode 3. Longest Substring Without Repeating Characters
leetcode 3. Longest Substring Without Repeating CharactersQuestionGiven a string, find the length of the longest substring without repeating characters.ExampleGiven “abcabcbb”, the answer is “abc”, whi原创 2017-01-10 10:31:37 · 375 阅读 · 0 评论 -
leetcode 4. Median of Two Sorted Arrays
leetcode 4. Median of Two Sorted ArraysQuestionThere 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原创 2017-01-10 13:48:32 · 430 阅读 · 0 评论 -
leetcode 338. Counting Bits
leetcode 338. Counting BitsQuestionGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an原创 2016-12-22 13:22:12 · 337 阅读 · 0 评论 -
leetcode 419. Battleships in a Board
leetcode 419. Battleships in a BoardQuestionGiven an 2D board, count how many different battleships are in it. The battleships are represented with ‘X’s, empty slots are represented with ‘.’s. You may原创 2016-12-22 11:21:55 · 488 阅读 · 0 评论 -
leetcode 448. Find All Numbers Disappeared in an Array
leetcode 448. Find All Numbers Disappeared in an ArrayQuestionGiven an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements原创 2016-12-22 10:22:59 · 822 阅读 · 0 评论