### leetcode

leetcode刷题总结，提供完整思路和源代码

0 已关注
25篇博文
• #### Leetcode OJ ： Reverse Words in a String

Given an input string, reverse the string word by word. For example, Given s = "the sky is blue"...

2014-04-18 21:39
586
• #### LeetCode OJ : two sum

Two Sum  Total Accepted: 18434 Total Submissions: 99493My Submissions Given an array of ...

2014-05-05 11:22
578
• #### LeetCode OJ : Reverse Integer

思路： 代码如下：

2014-05-05 21:11
486
• #### leetcode 刷题指南

这个zhilang

2014-05-12 11:01
3437
• #### LeetCode OJ : Median of Two Sorted Arrays

Median of Two Sorted Arrays  Total Accepted: 14675 Total Submissions: 87067My Submissions ...

2014-07-13 11:28
586
• #### Arrange an Array to Form a Smallest Digit

Question:  Input an array of positive integers, arrange the integers to form new digits, and output...

2015-04-13 22:00
484
• #### 371. Sum of Two Integers

题目1Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Ex...

2016-07-11 07:08
197
• #### 146. LRU Cache

题目Design and implement a data structure for Least Recently Used (LRU) cache. It should support the f...

2016-07-11 08:07
282
• #### 374. Guess Number Higher or Lower

题目1We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to ...

2016-07-15 07:35
509
• #### 389. Find the Difference

Given two strings s and t which consist of only lowercase letters.String t is generated by random sh...

2016-09-02 07:37
450
• #### 387. First Unique Character in a String

Given a string, find the first non-repeating character in it and return it’s index. If it doesn’t ex...

2016-09-02 08:31
251
• #### 367. Valid Perfect Square

Given a positive integer num, write a function which returns True if num is a perfect square else Fa...

2016-09-05 23:09
249
• #### 344. Reverse String

Write a function that takes a string as input and returns the string reversed.Example:Given s = "hel...

2016-09-05 23:21
201
• #### 83. Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.For exampl...

2016-09-05 23:30
234
• #### 82. Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numb...

2016-09-05 23:37
263
• #### 61. Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1-...

2016-09-07 08:35
270
• #### 206. Reverse Linked List

Reverse a singly linked list.思路 链表反转。有递归和非递归两种方法。在前面一篇文章《链表操作》中已经有介绍，这里就不多说了。代码（C++） * struct ListN...

2016-09-11 21:40
236
• #### 141、142 Linked List Cycle & II

Given a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using ex...

2016-09-11 22:32
238
• #### 19. Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.For example, Giv...

2016-09-16 09:14
213
• #### 21. Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing t...

2016-09-16 09:20
169