摘要:
Given an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) justified.You should p... 阅读全文
摘要:
Compare two version numbersversion1andversion1.Ifversion1>version2return 1, ifversion1 val2) return 1;26 if (val1 < val2) return -1;27 ... 阅读全文
摘要:
A peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its index.... 阅读全文
摘要:
Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.Credits:Special thanks to@tsf... 阅读全文
摘要:
Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially... 阅读全文