摘要: Description: Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip an image horizon 阅读全文
posted @ 2019-08-05 23:13 CodingYM 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Description: Given words first and second, consider occurrences in some text of the form "first second third", where second comes immediately after fi 阅读全文
posted @ 2019-08-05 22:51 CodingYM 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Description Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial w 阅读全文
posted @ 2019-08-05 21:54 CodingYM 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Description here is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 阅读全文
posted @ 2019-08-05 18:11 CodingYM 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Description The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two p 阅读全文
posted @ 2019-08-05 17:59 CodingYM 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Description Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". 阅读全文
posted @ 2019-08-05 17:46 CodingYM 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Description On an 8 x 8 chessboard, there is one white rook. There also may be empty squares, white bishops, and black pawns. These are given as chara 阅读全文
posted @ 2019-08-05 17:40 CodingYM 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Description Solution 阅读全文
posted @ 2019-08-05 17:11 CodingYM 阅读(169) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int maxProduct(int[] nums) { if(nums == null || nums.length ==0){ return 0; } int max = nums[0]; int min... 阅读全文
posted @ 2019-08-05 13:34 CodingYM 阅读(132) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int uniquePaths(int m, int n) { if (m ==0||n ==0){ return 0; } int dp [][] = new int[m][n]; //firs... 阅读全文
posted @ 2019-08-05 11:43 CodingYM 阅读(79) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int minFallingPathSum(int[][] A) { if(A== null|| A.length==0 || A[0].length ==0 ){ return 0; } int n = A.length ;... 阅读全文
posted @ 2019-08-05 10:53 CodingYM 阅读(123) 评论(0) 推荐(0) 编辑