2017年7月17日
摘要: Write a function to find the longest common prefix string amongst an array of strings. 找出,给出的一堆字符串的公共前缀。两个两个比较 阅读全文
posted @ 2017-07-17 20:09 Beserious 阅读(117) 评论(0) 推荐(0)
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 给出罗马数字 输出对应的阿拉伯数字。思路来自29的罗马数字 观看罗马数字构造规则(h 阅读全文
posted @ 2017-07-17 19:36 Beserious 阅读(134) 评论(0) 推荐(0)
摘要: Determine whether an integer is a palindrome. Do this without extra space. 就是判断 反转后的整数和反转之前的整数是否相等 阅读全文
posted @ 2017-07-17 16:55 Beserious 阅读(100) 评论(0) 推荐(0)
摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Note:The input is assumed to be a 32-bit signed integer. Yo 阅读全文
posted @ 2017-07-17 14:45 Beserious 阅读(112) 评论(0) 推荐(0)