摘要:
题目:There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the followin... 阅读全文
摘要:
题目:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after rain... 阅读全文
摘要:
题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may com... 阅读全文
摘要:
题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may com... 阅读全文
摘要:
题目:Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transact... 阅读全文
摘要:
题目: Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1... 阅读全文
摘要:
题目:Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all suc... 阅读全文