### LeetCode算法分析

LeetCode题目分析及解答

17 已关注
76篇博文
• #### LeetCode 01 Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number. The...

2014-10-30 23:50
1561
• #### LeetCode 02 Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in rever...

2014-11-03 22:09
1371
• #### LeetCode 03： Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, ...

2015-06-01 22:58
1592
• #### LeetCode 4： Median of Two Sorted Arrays

There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two...

2015-06-01 23:00
2872
• #### LeetCode 5:Longest Palindromic Substring

Given a string S, find the longest palindromic substring in S. You may assume that the maximum len...

2015-05-12 00:38
2576
• #### LeetCode 6: ZigZag Conversion

The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you...

2016-10-07 03:53
1252
• #### LeetCode 7: Reverse Integer

Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 代码如下：...

2015-06-01 23:07
1973
• #### LeetCode 8:String to Integer (atoi)

Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases...

2015-06-01 22:55
1974
• #### LeetCode 9： Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space. 本题是判断一个数是否是回文数。 代码如下： b...

2015-06-01 23:11
3103
• #### LeetCode 10： Regular Expression Matching

Implement regular expression matching with support for '.' and '*'. '.' Matches any single char...

2015-06-01 23:15
2432
• #### LeetCode 14： Longest Common Prefix

Longest Common Prefix Write a function to find the longest common prefix string amongst an ...

2015-07-30 19:04
1612
• #### LeetCode 15： 3 Sum

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all u...

2015-06-09 19:45
2672
• #### LeetCode 18: 4Sum

Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = t...

2015-06-02 22:00
2677
• #### LeetCode 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, ...

2015-06-02 22:03
1413
• #### LeetCode 20： Valid Parentheses

Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the inp...

2015-06-02 22:05
1433
• #### LeetCode 21：Merge Two Sorted Lists

LeetCode 21: Merge Two Sorted Lists   Merge two sorted linked lists and return it as a new list. ...

2015-05-27 23:08
3898
• #### LeetCode 23： Merge K Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. ...

2015-05-31 02:04
3265
• #### LeetCode 24:Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2-...

2015-06-13 23:12
1335
• #### LeetCode 25: Reverse Nodes in k-Group

Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. I...

2015-06-08 20:00
3427
• #### LeetCode 26： Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and re...

2015-06-15 19:32
1353