摘要:
题目描述:Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must... 阅读全文
摘要:
题目描述:Remove Nth Node From End of ListGiven a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list:... 阅读全文
摘要:
题目描述:4SumGiven an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives th... 阅读全文
摘要:
题目描述:Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of d... 阅读全文
摘要:
题目描述:3Sum ClosestGiven an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the thre... 阅读全文
摘要:
题目描述:3SumGiven an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.No... 阅读全文
摘要:
题目描述:Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.代码如下:class Solution {public: string... 阅读全文
摘要:
题目描述:Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.分析:① 输入为VII,则数字为V + I +... 阅读全文
摘要:
题目描述:Integer to RomanGiven an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.罗马数字的计数方法:基本字符IVXLCDM相应... 阅读全文
摘要:
题目描述:Container With Most WaterGivennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn s... 阅读全文