12 2017 档案
leetcode 97. Interleaving String
摘要:Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. 第一个思路肯定可能就是递归了 class Solution { public: int mark = 0; void dfs(string& s 阅读全文
posted @ 2017-12-29 23:10 Beserious 阅读(190) 评论(0) 推荐(0) 编辑
leetcode 750. Number Of Corner Rectangles
摘要:Given a grid where each entry is only 0 or 1, find the number of corner rectangles. A corner rectangle is 4 distinct 1s on the grid that form an axis 阅读全文
posted @ 2017-12-17 13:41 Beserious 阅读(875) 评论(0) 推荐(0) 编辑
leetcode 748. Shortest Completing Word
摘要:Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete th 阅读全文
posted @ 2017-12-17 13:40 Beserious 阅读(744) 评论(0) 推荐(0) 编辑
leetcode 746. Min Cost Climbing Stairs
摘要:Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the top of the floor, and you can either start fr 阅读全文
posted @ 2017-12-17 13:39 Beserious 阅读(282) 评论(0) 推荐(0) 编辑
最大流EK算法
摘要:给定一个有向图G=(V,E),把图中的边看作 管道,每条边上有一个权值,表示该管道 的流量上限。给定源点s和汇点t,现在假设 在s处有一个水源,t处有一个蓄水池,问从 s到t的最大水流量是多少? 网络流图里,源点流出的量,等于汇点流 入的量,除源汇外的任何点,其流入量之 和等于流出两之和。 下面我们 阅读全文
posted @ 2017-12-14 19:56 Beserious 阅读(5272) 评论(0) 推荐(1) 编辑
leetcode 343 Integer Break
摘要:Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
posted @ 2017-12-14 18:34 Beserious 阅读(199) 评论(0) 推荐(0) 编辑