### LeetCode #31 – Next Permutation [next_permutation函数原理]

Link 传送门 Problem Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascendin...

#### LeetCode #31 – Next Permutation [next_permutation函数原理]

Link 传送门 Problem Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such ar...

### LeetCode #30 – Substring with Concatenation of All Words [map]

Link 传送门 Problem You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in wordsexactly once and without any intervening charac...

#### LeetCode #30 – Substring with Concatenation of All Words [map]

Link 传送门 Problem You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(...

### LeetCode #29 – Divide Two Integers [思路]

Link 点击打开题目链接 Problem Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. Mean 计算INT内的两个数相除，不能使用乘法、除法和取模。 Analysis 首先想到除法变成减法，但是减法太慢了。这...

#### LeetCode #29 – Divide Two Integers [思路]

Link 点击打开题目链接 Problem Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. Mean ...

### LeetCode #28 – Implement strStr() [字符串匹配]

Link 点击打开题目链接 Problem Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Mean 给你两个字符串，找出第二个串在第一个串中出现的位置，找不到返回-1 Analysis 直接暴力匹配...

#### LeetCode #28 – Implement strStr() [字符串匹配]

Link 点击打开题目链接 Problem Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of h...

### LeetCode #27 – Remove Element [数组操作]

Link 点击打开题目链接 Problem Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn’t matter what you leave beyond the new length. Mean 给你一个整数...

#### LeetCode #27 – Remove Element [数组操作]

Link 点击打开题目链接 Problem Given an array and a value, remove all instances of that value in place and return the new length. The order of eleme...

### LeetCode #26 – Remove Duplicates from Sorted Array [数组操作]

Link 点击打开题目链接 Problem Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory. Fo...

#### LeetCode #26 – Remove Duplicates from Sorted Array [数组操作]

Link 点击打开题目链接 Problem Given a sorted array, remove the duplicates in place such that each element appear only once and return the new lengt...