上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页

LeetCode 485 Max Consecutive Ones 解题报告

摘要: 题目要求 Given a binary array, find the maximum number of consecutive 1s in this array. 题目分析及思路 给定一个01数组,要求找到这个数组中连续1的最大长度。可以考虑0的位置,结合数组切片,循环进行。要记得把最后数组的长 阅读全文
posted @ 2019-03-24 09:58 锋上磬音 阅读(106) 评论(0) 推荐(0) 编辑

LeetCode 896 Monotonic Array 解题报告

摘要: 题目要求 An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if for all i <= j, A[i] <= A[ 阅读全文
posted @ 2019-03-23 14:35 锋上磬音 阅读(81) 评论(0) 推荐(0) 编辑

LeetCode 706 Design HashMap 解题报告

摘要: 题目要求 Design a HashMap without using any built-in hash table libraries. To be specific, your design should include these functions: put(key, value) : I 阅读全文
posted @ 2019-03-22 09:55 锋上磬音 阅读(124) 评论(0) 推荐(0) 编辑

LeetCode 427 Construct Quad Tree 解题报告

摘要: 题目要求 We want to use quad trees to store an N x N boolean grid. Each cell in the grid can only be true or false. The root node represents the whole gri 阅读全文
posted @ 2019-03-21 10:32 锋上磬音 阅读(120) 评论(0) 推荐(0) 编辑

LeetCode 812 Largest Triangle Area 解题报告

摘要: 题目要求 You have a list of points in the plane. Return the area of the largest triangle that can be formed by any 3 of the points. 题目分析及思路 给定一个平面上的一组点,要求 阅读全文
posted @ 2019-03-20 09:32 锋上磬音 阅读(179) 评论(0) 推荐(0) 编辑

LeetCode 292 Nim Game 解题报告

摘要: 题目要求 You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 阅读全文
posted @ 2019-03-19 09:53 锋上磬音 阅读(124) 评论(0) 推荐(0) 编辑

LeetCode 1012 Complement of Base 10 Integer 解题报告

摘要: 题目要求 Every non-negative integer N has a binary representation. For example, 5 can be represented as "101" in binary, 11 as "1011" in binary, and so on 阅读全文
posted @ 2019-03-18 09:18 锋上磬音 阅读(243) 评论(0) 推荐(0) 编辑

LeetCode 784 Letter Case Permutation 解题报告

摘要: 题目要求 Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible 阅读全文
posted @ 2019-03-17 10:27 锋上磬音 阅读(142) 评论(0) 推荐(0) 编辑

LeetCode 892 Surface Area of 3D Shapes 解题报告

摘要: 题目要求 On a N * N grid, we place some 1 * 1 * 1 cubes. Each value v = grid[i][j] represents a tower of v cubes placed on top of grid cell (i, j). Return 阅读全文
posted @ 2019-03-16 09:46 锋上磬音 阅读(89) 评论(0) 推荐(0) 编辑

LeetCode 917 Reverse Only Letters 解题报告

摘要: 题目要求 Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their p 阅读全文
posted @ 2019-03-15 09:20 锋上磬音 阅读(168) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页