Sara

  • Home

  • Tags

  • Categories

  • Archives

  • Search

LeetCode_Edit Distance

Posted on 2019-02-19 | Edited on 2019-08-05 | In LeetCode

Edit Distance

Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
(计算编辑距离)

Read more »

LeetCode_Text Justification

Posted on 2019-02-19 | In LeetCode

Text Justification

(文本左右对齐)

Read more »

LeetCode_Set Matrix Zeroes

Posted on 2019-02-16 | In LeetCode

Set Matrix Zeroes

Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place.
(设置矩阵整行&列为0)

Read more »

LeetCode_Simplify Path

Posted on 2019-02-16 | In LeetCode

Simplify Path

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.
(简化文件路径)

Read more »

LeetCode_Climbing Stairs

Posted on 2019-02-16 | In LeetCode

Climbing Stairs

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.)
(爬楼梯问题)

Read more »

LeetCode_Sqrt X

Posted on 2019-02-16 | In LeetCode

Sqrt(x)

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))

Read more »

LeetCode_AddBinary

Posted on 2019-01-24 | In LeetCode

Add Binary

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.
(二进制字符串加法)

Read more »

LeetCode_Plus One

Posted on 2019-01-24 | In LeetCode

Plus One

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)

Read more »

LeetCode_Valid Number

Posted on 2019-01-15 | In LeetCode

Valid Number

Validate if a given string can be interpreted as a decimal number.
(字符串是否为有效数字)

Read more »

LeetCode_Minimum Path Sum

Posted on 2019-01-15 | In LeetCode

Minimum Path Sum

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.
(最小带权路径和,只能向右或者向下移动从左上角移动到右下角的带权路径和)

Read more »
1…131415…21

Sara Han

207 posts
4 categories
40 tags
© 2019 Sara Han
Powered by Hexo v3.8.0
|
Theme – NexT.Mist v6.4.2