上一页 1 ··· 6 7 8 9 10 11 下一页

LeetCode 509 Fibonacci Number 解题报告

摘要: 题目要求 The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two precedin 阅读全文
posted @ 2019-01-30 09:22 锋上磬音 阅读(164) 评论(0) 推荐(0) 编辑

LeetCode 973 K Closest Points to Origin 解题报告

摘要: 题目要求 We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is the E 阅读全文
posted @ 2019-01-29 16:56 锋上磬音 阅读(138) 评论(0) 推荐(0) 编辑

LeetCode 561 Array Partition I 解题报告

摘要: 题目要求 Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes su 阅读全文
posted @ 2019-01-28 10:18 锋上磬音 阅读(107) 评论(0) 推荐(0) 编辑

LeetCode 728 Self Dividing Numbers 解题报告

摘要: 题目要求 A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 阅读全文
posted @ 2019-01-27 12:21 锋上磬音 阅读(98) 评论(0) 推荐(0) 编辑

LeetCode 852 Peak Index in a Mountain Array 解题报告

摘要: 题目要求 Let's call an array A a mountain if the following properties hold: A.length >= 3 There exists some 0 < i < A.length - 1 such that A[0] < A[1] < . 阅读全文
posted @ 2019-01-26 09:54 锋上磬音 阅读(97) 评论(0) 推荐(0) 编辑

LeetCode 977 Squares of a Sorted Array 解题报告

摘要: 题目要求 Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order. 阅读全文
posted @ 2019-01-25 09:14 锋上磬音 阅读(461) 评论(0) 推荐(0) 编辑

LeetCode 617 Merge Two Binary Trees 解题报告

摘要: 题目要求 Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others 阅读全文
posted @ 2019-01-21 11:03 锋上磬音 阅读(154) 评论(0) 推荐(0) 编辑

LeetCode 942 DI String Match 解题报告

摘要: 题目要求 Given a string S that only contains "I" (increase) or "D" (decrease), let N = S.length. Return any permutation A of [0, 1, ..., N] such that for 阅读全文
posted @ 2019-01-10 14:39 锋上磬音 阅读(92) 评论(0) 推荐(0) 编辑

LeetCode 461 Hamming Distance 解题报告

摘要: 题目要求 The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, c 阅读全文
posted @ 2019-01-09 14:33 锋上磬音 阅读(100) 评论(0) 推荐(0) 编辑

LeetCode 657 Robot Return to Origin 解题报告

摘要: 题目要求 There 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, 0) aft 阅读全文
posted @ 2019-01-08 09:39 锋上磬音 阅读(115) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 下一页