- 博客(11)
- 资源 (2)
- 收藏
- 关注
原创 leetcode137 Single Number II
题目: Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it wi
2015-11-19 21:40:29 503
原创 leetcode123 Best Time to Buy and Sell Stock III
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most two transactions. Note:
2015-11-06 21:43:37 1935
原创 leetcode122 Best Time to Buy and Sell Stock II
题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i
2015-11-06 19:18:28 572
原创 leetcode121 Best Time to Buy and Sell Stock
题目: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of th
2015-11-06 16:57:30 431
原创 leetcode45 Jump Game II
题目: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Yo
2015-11-06 14:47:05 376
原创 leetcode55 Jump Game
题目: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. De
2015-11-05 23:04:29 488
原创 leetcode155 Min Stack
题目: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()
2015-11-05 21:53:22 500
原创 leetcode232 Implement Queue using Stacks
题目: Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.peek() -- Get the front eleme
2015-11-05 20:50:28 460
原创 leetcode225 Implement Stack using Queues
题目: Implement the following operations of a stack using queues. push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- Re
2015-11-05 20:47:57 349
原创 leetcode18 4sum
题目: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. 思路:
2015-11-05 20:42:22 415
原创 leetcode15 3sum
题目: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. 翻译: 找到三个数相加之和为0,并且三个数是非递减顺序排列
2015-11-05 20:38:35 357
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人