摘要: 题目描述: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three int 阅读全文
posted @ 2016-07-03 03:06 godlei 阅读(180) 评论(0) 推荐(0)
摘要: 题目描述: Given a roman numeral, convert it to an integer. 解题分析: 这道题只要百度一下转换的规则,然后着这解释写代码即可。实现上并没有什么难度,直接看代码即可 具体代码: 阅读全文
posted @ 2016-07-03 02:52 godlei 阅读(166) 评论(0) 推荐(0)
摘要: 题目描述: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the s 阅读全文
posted @ 2016-07-03 02:44 godlei 阅读(178) 评论(0) 推荐(0)
摘要: 题目描述: Write a function to find the longest common prefix string amongst an array of strings. 解题思路: 这道题很简单,分两步: 1. 找出所有字符串中长度最小的那个字符串的值(可能的结果的最大值,保证查找时 阅读全文
posted @ 2016-07-03 02:28 godlei 阅读(221) 评论(0) 推荐(0)