练习题 (四)
摘要:题目:Basic Calculator IIImplement a basic calculator to evaluate a simple expression string.The expression string contains onlynon-negativeintegers,+,-,...
阅读全文
练习题 (三)
摘要:题目:Summary RangesGiven a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->...
阅读全文
练习题 (二)
摘要:题目:Majority Element IIGiven an integer array of sizen, find all elements that appear more than⌊ n/3 ⌋times. The algorithm should run in linear time an...
阅读全文
练习题 (一)
摘要:题目:Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"我的解答:/** * @param {st...
阅读全文