Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
分类:
其他好文 时间:
2014-07-07 23:16:52
阅读次数:
197
class Solution {public: int minPathSum(vector > &grid) { int rows = grid.size(); if (rows pathsum(cols + 1, INT_MAX); pathsum...
分类:
其他好文 时间:
2014-06-30 13:23:04
阅读次数:
153
题目
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down...
分类:
其他好文 时间:
2014-06-30 11:10:34
阅读次数:
211
题目
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You have the following 3 operations permitte...
分类:
其他好文 时间:
2014-06-30 00:46:38
阅读次数:
262
题目
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum wi...
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
分类:
其他好文 时间:
2014-06-27 23:02:33
阅读次数:
258
Given a triangle, find the minimum path sum from top to bottom. Each step you maymove to adjacent numbers on the row below.For example, given the fol....
分类:
其他好文 时间:
2014-06-27 16:29:58
阅读次数:
188
网页宽度页面box不要写宽度或width:100%之类的去掉头部加上下面代码:<metaname="viewport"content="width=device-width,initial-scale=1.0,minimum-scale=0.5,maximum-scale=2.0,user-scalable=yes"/>图片宽度<scripttype="text/javascript">functioninit(){varji..
分类:
移动开发 时间:
2014-06-27 07:05:34
阅读次数:
239
【题目】
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 of s.
For example, given s = "aab",
Return 1 since the palindrome partitioning ["aa","b"] could b...
分类:
其他好文 时间:
2014-06-26 07:48:00
阅读次数:
259
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2014-06-25 11:14:15
阅读次数:
218