Greedy
dyllanzhou
这个作者很懒,什么都没留下…
展开
-
[Leetcode]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. Determine if原创 2015-10-26 19:54:14 · 330 阅读 · 0 评论 -
[Leetcode]Gas Station
There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to it原创 2015-10-27 23:55:14 · 261 阅读 · 0 评论 -
[Leetcode]Remove Duplicate Letters
Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your result is the smallest in lexicographical order a原创 2016-01-29 12:15:19 · 411 阅读 · 0 评论 -
[Leetcode]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. Your goal is原创 2016-03-09 22:40:57 · 314 阅读 · 0 评论