题目:罗马数字转为阿拉伯数字
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.
分析:题意:将给定的罗马数字转为阿拉伯数字
从前往后遍历罗马数字,如果某个数比前一个数小,则把该数加入到结果中;
反之,则在结果中两次减去前一个数并加...
分类:
其他好文 时间:
2015-08-13 20:11:14
阅读次数:
135
题目:阿拉伯数字转罗马数字Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.原题链接地址:https://leetcode.com/problems/integer-to-roman/
分析:题意将阿拉伯数字num转罗马数字
拼写...
分类:
其他好文 时间:
2015-08-13 20:10:49
阅读次数:
129
题目:最大的盛水容器Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fi...
分类:
其他好文 时间:
2015-08-13 18:00:02
阅读次数:
103
题目:回文数字的判断
Determine whether an integer is a palindrome. Do this without extra space.Some hints:
Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to strin...
分类:
其他好文 时间:
2015-08-13 17:59:30
阅读次数:
129
Number of 1 Bits leetcode解题报告...
分类:
其他好文 时间:
2015-08-09 14:14:19
阅读次数:
126
Reverse Bits leetcode解题报告...
分类:
其他好文 时间:
2015-08-09 14:13:34
阅读次数:
114
Power of Two leetcode解题报告...
分类:
其他好文 时间:
2015-08-09 12:33:13
阅读次数:
148
Roman to Integer leetcode解题报告...
分类:
其他好文 时间:
2015-08-06 22:37:33
阅读次数:
123
Integer to Roman leetcode解题报告...
分类:
其他好文 时间:
2015-08-06 22:34:07
阅读次数:
161
Problem:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the...
分类:
其他好文 时间:
2015-05-05 19:42:36
阅读次数:
101