59. Spiral Matrix II 题目 Given an integer n, generate a square matrix filled with elements from 1 to n2 in spir…
标签:LeetCode题目解答
61. Rotate List
61. Rotate List 题目 Given a list, rotate the list to the right by k places, where k is non-negative. Example: G…
62. Unique Paths && 63. Unique Paths II
62. Unique Paths 题目 A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram b…
67. Add Binary
67. Add Binary 题目 Given two binary strings, return their sum (also a binary string). For example, a = "11" b =…
64. Minimum Path Sum
64. Minimum Path Sum 题目 Given a m x n grid filled with non-negative numbers, find a path from top left to bott…
65. Valid Number
65. Valid Number 题目 Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "a…
69. Sqrt(x)
69. Sqrt(x) 题目 Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non…
66. Plus One
66. Plus One 题目 Given a non-negative integer represented as a non-empty array of digits, plus one to the integ…
70. Climbing Stairs
70. Climbing Stairs 题目 You are climbing a stair case. It takes n steps to reach to the top. Each time you can …
72. Edit Distance
72. Edit Distance 题目 要想把字符串S1变成S2,可以经过若干次下列原子操作: 1.删除一个字符 2.增加一个字符 3.更改一个字符 字符串S1和S2的编辑距离定义为从S1变成S2所需要原子操作的最少次…
71. Simplify Path
71. Simplify Path 题目 Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/"…
73. Set Matrix Zeroes
73. Set Matrix Zeroes 题目 Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it i…