![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
xwj1990
这个作者很懒,什么都没留下…
展开
-
[leetcode] Roman to integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.其实一个一个加就行,例如IV是4,但直接加的结果是6,这个时候减去2就行。转载 2014-04-14 16:50:20 · 386 阅读 · 0 评论 -
[leetcode] Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n).If the target is not found in转载 2014-04-15 21:36:00 · 355 阅读 · 0 评论 -
[leetcode] Reverse integers
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers.Have you thought about this?Here are some good questions to ask before coding原创 2014-04-15 10:14:56 · 307 阅读 · 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转载 2014-04-18 10:26:31 · 356 阅读 · 0 评论