medium-算法
意涵团_晴天
愿有岁月可回首
展开
-
495. Teemo Attacking
In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo’s attacking ascending time series towards Ashe and the poisoning time原创 2017-04-20 14:07:51 · 233 阅读 · 0 评论 -
动态规划入门-Triangle
动归解题的一般思路:将原问题分解成多个子问题。子问题都解决了,原问题就解决了用动态规划解题时,我们往往将和子问题相关的各个变量的一组取值,称之为一个“状态”。一个“状态”对应于一个或多个子问题,所谓某个“状态”下的“值”,就是这个“状态”所对应的子问题的解确定初始状态确定状态转移方程eg:leetcode120. Triangle Given a triangle, find the mi原创 2017-04-20 10:13:39 · 334 阅读 · 0 评论 -
Find Minimum in Rotated Sorted Array
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplicate exist原创 2017-04-20 14:53:57 · 422 阅读 · 0 评论 -
Find Minimum in Rotated Sorted Array II
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.The array may contain duplicates.原创 2017-04-20 15:08:04 · 272 阅读 · 0 评论