随笔分类 - LeetCode
摘要:Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 思路分析: 1、熟悉罗马数字的规则。见LeetCode之Easy篇 ——(12)In
阅读全文
摘要:Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 罗马数字: I V X L C D M 1 5 10 50 100 500 1000
阅读全文
摘要:Determine whether an integer is a palindrome. Do this without extra space. 思路一:颠倒整数,再比较。 思路二:翻转后半部分,与前半部分比较。
阅读全文
摘要:7、Reverse Integer Given a 32-bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note:Assume we are dealing with an env
阅读全文
摘要:1、Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input wou
阅读全文

浙公网安备 33010602011771号