上一页 1 ··· 54 55 56 57 58 59 60 61 62 ··· 76 下一页
摘要: Say you have an array for which the i-th element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may compl 阅读全文
posted @ 2019-10-10 12:00 Schwifty 阅读(180) 评论(0) 推荐(0)
摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example: 把每一列看成histogram,就可以得到4个 阅读全文
posted @ 2019-10-10 09:00 Schwifty 阅读(148) 评论(0) 推荐(0)
摘要: 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 comple 阅读全文
posted @ 2019-10-08 02:16 Schwifty 阅读(180) 评论(0) 推荐(0)
摘要: Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning 阅读全文
posted @ 2019-10-05 11:15 Schwifty 阅读(156) 评论(0) 推荐(0)
摘要: Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique. Exam 阅读全文
posted @ 2019-10-05 09:54 Schwifty 阅读(165) 评论(0) 推荐(0)
摘要: Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,2,5,3,7,101,18] Output: 4 Explanation: T 阅读全文
posted @ 2019-09-28 09:55 Schwifty 阅读(136) 评论(0) 推荐(0)
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2019-09-28 04:57 Schwifty 阅读(165) 评论(0) 推荐(0)
摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: 自底向上的DP。递推公式下图可以理解,因为F(i, n)表示n个数字且以第i个为根的bst个数, 阅读全文
posted @ 2019-09-28 02:49 Schwifty 阅读(159) 评论(0) 推荐(0)
摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文
posted @ 2019-09-27 03:08 Schwifty 阅读(167) 评论(0) 推荐(0)
摘要: Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be for 阅读全文
posted @ 2019-09-27 02:21 Schwifty 阅读(141) 评论(0) 推荐(0)
上一页 1 ··· 54 55 56 57 58 59 60 61 62 ··· 76 下一页