摘要: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho 阅读全文
posted @ 2016-12-22 23:59 wilderness 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 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 integers. 阅读全文
posted @ 2016-12-22 23:04 wilderness 阅读(118) 评论(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 sum of 阅读全文
posted @ 2016-12-22 17:00 wilderness 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings. 题意:找出所给几个字符串的相同前缀 思路:用第一个字符串和之后的所有字符串进行对比,标示出相同字符串的超尾指针就行 ps:通过 阅读全文
posted @ 2016-12-22 13:28 wilderness 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 题意:把罗马数字转变为数字 阅读全文
posted @ 2016-12-22 12:14 wilderness 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 题意:把数字转换为罗马数字 感觉用c的话太麻烦了,所以用Python写了 阅读全文
posted @ 2016-12-22 00:01 wilderness 阅读(163) 评论(0) 推荐(0) 编辑