摘要:
题目: 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 i... 阅读全文
摘要:
题目: 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 th... 阅读全文
摘要:
题目: Write a function to find the longest common prefix string amongst an array of strings. 题目大意: 写一个函数,求一个字符串数组中最长的公共前缀子串。 思路: 在做这道题之前先要了解一下... 阅读全文
摘要:
题目: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 题目大意: 给定一个罗马数字,将其转化为一个整数。转化好的... 阅读全文
摘要:
题目: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 题目大意: 输入一个整形数字,将其转化为罗马数字,范围在1... 阅读全文
摘要:
题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that t... 阅读全文
摘要:
题目: , Implement regular expression matching with support for '.' and '*'. '.' Matches any single character.'*' Matches zero or more of the preced... 阅读全文
摘要:
题目: Determine whether an integer is a palindrome. Do this without extra space. 题目大意: 判断一个数字是不是回文数,要求不是用额外的空间。 思路: 最近的几道LeetCode的题很简单,答题思路就是将原数... 阅读全文