1. 程式人生 > >LintCode - Two Pointers 總結

LintCode - Two Pointers 總結

同向雙指標

Window Sum [easy]

Move Zeroes [easy]

Remove Duplicate Numbers In Array [easy]

 

相向雙指標

Valid Palindrome

Rotate String

Recover Rotate Sorted Array

 

Two Sum

Two Sum

Two Sum II

Two Sum Data Structure Design (HashMap only)

Two Sum Input Array is Sorted

Two Sum Unique Pairs

3 Sum

Triangle Count

Two Sum Closest

3 Sum Closest

4 Sum

k Sum

Two Sum Difference Equals to target

 

Trapping Rain Water

Container with Most Water

 

Partition

Partition Array

 

Quick Select

Kth Smallest Numbers in Unsorted Array

Partition Array by Odd and Even

Interleaving Positive and Negative Numbers

Sort Letters by Case

Nuts Bolts Problems

分成兩個部分 vs 分成三個部分

Sort Colors

Sort Letters by Case

Valid Palindrome

排序演算法

Sort Colors II (RainBow Sort)

Pancake Sort

Sleep Sort

Spaghetti Sort

Bogo Sort

 

視窗類

Minimum Size Subarray Sum

Longest Substring Without Repeating Characters

Minimum Window Substring

Longest Substring with At Most Two Distinct Characters

Longest Substring with At Most K Distinct Characters

 

兩個陣列兩個指標

The Smallest Difference

Merge Two Sorted Lists