Edit Distance
Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
(计算编辑距离)
Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
(计算编辑距离)
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place.
(设置矩阵整行&列为0)
Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path. In a UNIX-style file system, a period . refers to the current directory. Furthermore, a double period .. moves the directory up a level. Note that the returned canonical path must always begin with a slash /, and there must be only a single slash / between two directory names. The last directory name (if it exists) must not end with a trailing /. Also, the canonical path must be the shortest string representing the absolute path.
(简化文件路径)
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? (Note: Given n will be a positive integer.)
(爬楼梯问题)
Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return type is an integer, the decimal digits are truncated and only the integer part of the result is returned.
(实现Sqrt(x))
Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0.
(二进制字符串加法)
Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant digit is at the head of the list, and each element in the array contain a single digit. You may assume the integer does not contain any leading zero, except the number 0 itself.
(数组形式的数字串数值加1)
Validate if a given string can be interpreted as a decimal number.
(字符串是否为有效数字)
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. You can only move either down or right at any point in time.
(最小带权路径和,只能向右或者向下移动从左上角移动到右下角的带权路径和)