### LeetCode

0 已关注
96篇博文
• #### 349. Intersection of Two Arrays(两数组的交集,vector中find()函数, 结果集去重)

题目 Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2...

2018-02-25 23:18
27
• #### 350. Intersection of Two Arrays II（两数组交集）

题目 Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2...

2018-02-26 00:15
33
• #### 292. Nim Game(尼姆游戏)

题目 You are playing the following Nim Game with your friend: There is a heap of stones on the table,...

2018-02-26 16:30
71
• #### 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’...

2018-02-26 17:32
33
• #### 70. Climbing Stairs（爬楼梯）

题目 You are climbing a stair case. It takes n steps to reach to the top. Each time you can either c...

2018-02-24 11:13
27
• #### 198. House Robber(动态规划--房屋强盗）

题目 You are a professional robber planning to rob houses along a street. Each house has a certain am...

2018-02-24 11:47
43
• #### 303. Range Sum Query - Immutable(和累加法）

题目 Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclu...

2018-02-24 12:16
30
• #### 455. Assign Cookies（分蛋糕--贪心）

题目 Assume you are an awesome parent and want to give your children some cookies. But, you should gi...

2018-02-24 15:36
44
• #### 202. Happy Number(unordered_map）

题目 Write an algorithm to determine if a number is “happy”. A happy number is a number defined by t...

2018-02-24 17:13
30
• #### 204. Count Primes(厄拉多塞筛法--质数筛法)

题目 Description: Count the number of prime numbers less than a non-negative number, n. 题意 小于n的素...

2018-02-25 22:57
83
• #### 242. Valid Anagram(有颠倒顺序构成的字符串---字符串排序(c++和python)

题目 Given two strings s and t, write a function to determine if t is an anagram of s. s = &quot...

2018-02-25 23:03
67
• #### Leetcode#697. Degree of an Array(数组的度)

题目 Given a non-empty array of non-negative integers nums, the degree of this array is defined as th...

2018-02-18 23:48
99
• #### Leetcode#695. Max Area of Island(岛屿最大面积,深搜dfs)

题目 Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) ...

2018-02-19 16:15
206
• #### Leetcode#746. Min Cost Climbing Stairs(最低花费登楼梯--动态规划)

题目 On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you...

2018-02-19 17:07
43
• #### Leetcode#561. Array Partition I

题目 Given an array of 2n integers, your task is to group these integers into n pairs of integer, say...

2018-02-19 21:27
27
• #### Leetcode#661. Image Smoother

题目 Given a 2D integer matrix M representing the gray scale of an image, you need to design a smooth...

2018-02-19 21:35
24
• #### 155. Min Stack(带有获取当前最小值的栈)

题目 Design a stack that supports push, pop, top, and retrieving the minimum element in constant time...

2018-02-21 13:48
23
• #### 225. Implement Stack using Queues（用队列模拟栈）

题目 Implement the following operations of a stack using queues. push(x) – Push element x onto stac...

2018-02-21 14:25
30
• #### 232. Implement Queue using Stacks（用栈模拟队列）

题目 Implement the following operations of a queue using stacks. push(x) -- Push element x to the ba...

2018-02-23 22:44
38
• #### 496. Next Greater Element I(下一个更大的元素）

题目 You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset ...

2018-02-23 23:56
57