摘要:
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input: Digit string "23"... 阅读全文
摘要:
Write a function to find the longest common prefix string amongst an array of strings.1234567891011121314class Solution {public: string longestCommonPrefix(vector& strs) { if(strs.empty()) r... 阅读全文
摘要:
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. You may assume that each input would have exactly... 阅读全文
摘要:
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 zero.Note: The solution set must not contain dupli... 阅读全文