摘要:
题目:Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the his... 阅读全文
摘要:
题目:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the long... 阅读全文
摘要:
题目:Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the corre... 阅读全文
摘要:
题目:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word ... 阅读全文
摘要:
题目:Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to show corner ... 阅读全文
摘要:
题目:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.代码:class Solution {public: vect... 阅读全文
摘要:
题目:The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as... 阅读全文
摘要:
题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.代码:class Solution {public: int romanTo... 阅读全文
摘要:
题目:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.代码:class Solution {public: string intT... 阅读全文
摘要:
题目:Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem s... 阅读全文