最新 最热

leetcode 26 Remove Duplicates from Sorted Array

class Solution {public: int removeDuplicates(int A[], int n) { if (n <= 1) return n; int pre = 0, cur = 0; while (cur < n) { ...

2018-06-04
3

Remove Duplicates from Sorted Array II

问题描述Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice? For example, G

2018-05-28
3

Leercode 35 Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You...

2018-01-12
3

Leetcode 26 Remove Duplicates from Sorted Array

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 anothe...

2018-01-12
3

Leetcode 47 Permutations II

Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutat...

2018-01-12
3

Leetcode 80 Remove Duplicates from Sorted Array II

Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Giv

2018-01-12
3

Leetcode 90 Subsets II

Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. F...

2018-01-12
3

Leetcode 83 Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, ret...

2018-01-12
3

Leetcode 81 Search in Rotated Sorted Array II

Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect

2018-01-12
3

Leetcode 106 Construct Binary Tree from Inorder and Postorder Traversal

Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. 中序和后序还原二叉树。 直接在上...

2018-01-12
3