摘要: 65. Valid Number Validate if a given string can be interpreted as a decimal number. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => fal 阅读全文
posted @ 2019-03-11 19:47 mingL 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 64. 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 num 阅读全文
posted @ 2019-03-11 19:42 mingL 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 63. Unique Paths II A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either do 阅读全文
posted @ 2019-03-08 00:06 mingL 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 62. Unique Paths Share Share A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move 阅读全文
posted @ 2019-03-08 00:03 mingL 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 61. Rotate List Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Example 2: 阅读全文
posted @ 2019-03-03 19:17 mingL 阅读(143) 评论(0) 推荐(0) 编辑
摘要: let obj={ 'a':'a', 'b':null, 'c':'c' } var removePropertyOfNull=function(obj){ Object.keys(obj).forEach(item=>{ if(!obj[item]) delete obj[item] }) return obj; } remo... 阅读全文
posted @ 2019-03-02 22:15 mingL 阅读(6377) 评论(0) 推荐(1) 编辑
摘要: 60. Permutation Sequence The set [1,2,3,...,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, w 阅读全文
posted @ 2019-03-01 20:17 mingL 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 59. Spiral Matrix II Given a positive integer n, generate a square matrix filled with elements from 1 to n2in spiral order. Example: 阅读全文
posted @ 2019-03-01 20:15 mingL 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 58. Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the 阅读全文
posted @ 2019-03-01 20:13 mingL 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 57. Insert Interval Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the i 阅读全文
posted @ 2019-03-01 20:11 mingL 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 56. Merge Intervals Given a collection of intervals, merge all overlapping intervals. Example 1: Example 2: 阅读全文
posted @ 2019-03-01 20:07 mingL 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 55. Jump Game Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represe 阅读全文
posted @ 2019-03-01 20:04 mingL 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 54. Spiral Matrix Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Example 2: 阅读全文
posted @ 2019-03-01 20:00 mingL 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 53. Maximum Subarray Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return i 阅读全文
posted @ 2019-03-01 19:54 mingL 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 52. N-Queens II The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an intege 阅读全文
posted @ 2019-02-26 19:51 mingL 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 51. N-Queens The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n 阅读全文
posted @ 2019-02-26 19:39 mingL 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 50. Pow(x, n) Implement pow(x, n), which calculates x raised to the power n (xn). Example 1: Example 2: Example 3: 阅读全文
posted @ 2019-02-24 22:37 mingL 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 49. Group Anagrams Given an array of strings, group anagrams together. Example: 阅读全文
posted @ 2019-02-24 22:36 mingL 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 48. Rotate Image You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the imag 阅读全文
posted @ 2019-02-24 22:34 mingL 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 47. Permutations II Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: 阅读全文
posted @ 2019-02-24 22:32 mingL 阅读(115) 评论(0) 推荐(0) 编辑