- 博客(3)
- 收藏
- 关注
原创 LeetCode: Dungeon Game
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially p
2015-05-18 11:56:00 312
原创 LeetCode: Maximum Gap
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 if the array contains less than 2 elements
2015-05-06 23:42:56 427
原创 LeetCode: Best Time to Buy and Sell Stock IV
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 k transactions.Note:You may no
2015-05-05 04:46:03 388
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人