随笔分类 -  Leetcode | DP

摘要:问题描述Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.F... 阅读全文
posted @ 2015-07-26 15:57 Chapter 阅读(170) 评论(0) 推荐(0)
摘要:问题描述Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following ... 阅读全文
posted @ 2015-07-15 10:40 Chapter 阅读(125) 评论(0) 推荐(0)
摘要:编辑距离和最长公共子串问题都是经典的DP问题,首先来看看编辑距离问题:问题描述Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each ope... 阅读全文
posted @ 2015-06-19 14:46 Chapter 阅读(388) 评论(0) 推荐(0)