2015年10月30日

149. Max Points on a Line (Array; Greedy)

摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 思路:对于某一点来说,在经过该点的直线中选取节点数量最多的直线;对于全局来说,必定是某个局部点满足条 阅读全文

posted @ 2015-10-30 19:23 joannae 阅读(176) 评论(0) 推荐(0) 编辑

55. Jump Game (Array; Greedy)

摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文

posted @ 2015-10-30 19:15 joannae 阅读(197) 评论(0) 推荐(0) 编辑

87. Scramble String (String; DP)

摘要: Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representati 阅读全文

posted @ 2015-10-30 18:59 joannae 阅读(271) 评论(0) 推荐(0) 编辑

115. Distinct Subsequences (String; DP)

摘要: Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t 阅读全文

posted @ 2015-10-30 06:29 joannae 阅读(187) 评论(0) 推荐(0) 编辑

导航