- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 leetcode Unique Paths II
Unique Paths II Total Accepted: 2092 Total Submissions: 8049My SubmissionsFollow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths woul
2013-12-03 21:03:10 781
原创 LeetCode 60. Permutation Sequence第k个排列
Permutation SequenceTotal Accepted:1819Total Submissions:9060My SubmissionsThe set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permu
2013-12-03 20:26:05 930
原创 leetcode Search Insert Position
Search Insert PositionTotal Accepted:4060Total Submissions:12013My SubmissionsGiven a sorted array and a target value, return the index if the target is found. If not, return the index w...
2013-12-03 09:51:32 747
原创 Leetcode 42 407 Trapping Rain Water I II 双指针
Trapping Rain WaterTotal Accepted:2335Total Submissions:8464My SubmissionsGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how mu
2013-12-02 22:19:12 870
原创 leetcode Container With Most Water
Container With Most Water Total Accepted: 2685 Total Submissions: 9008My SubmissionsGiven n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai).
2013-12-02 18:48:11 871
原创 leetcode Single Number II
Single Number II Total Accepted: 4273 Total Submissions: 14218My SubmissionsGiven an array of integers, every element appears three times except for one. Find that single one.Note:Yo
2013-12-02 11:02:51 853
原创 常用的位操作
1. 把最右边的1置为0 (比如可以用来判断一个数是否为2的n次幂)num = num & (num - 1)2. int x = -1; x>>1 是无效的 只有unsigned int x = (unsigned int)(-1) 才可以 这样(unsigned int)(-1) >> 1可以返回最大的整数2. 获取最右边1的位置:
2013-12-01 20:50:24 1221
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人