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

LeetCode 496 Next Greater Element I 解题报告

摘要: 题目要求 You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for n 阅读全文
posted @ 2019-03-04 10:06 锋上磬音 阅读(127) 评论(0) 推荐(0) 编辑

LeetCode 412 Fizz Buzz 解题报告

摘要: 题目要求 Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the 阅读全文
posted @ 2019-03-03 09:17 锋上磬音 阅读(253) 评论(0) 推荐(0) 编辑

LeetCode 937 Reorder Log Files 解题报告

摘要: 题目要求 You have an array of logs. Each log is a space delimited string of words. For each log, the first word in each log is an alphanumeric identifier. 阅读全文
posted @ 2019-03-02 10:08 锋上磬音 阅读(190) 评论(0) 推荐(0) 编辑

LeetCode 136 Single Number 解题报告

摘要: 题目要求 Given a non-empty array of integers, every element appears twice except for one. Find that single one. 题目分析及思路 给定一个非空整数数组,除了一个元素只出现一次外,其余元素均出现两次。 阅读全文
posted @ 2019-03-01 10:03 锋上磬音 阅读(77) 评论(0) 推荐(0) 编辑

LeetCode 104 Maximum Depth of Binary Tree 解题报告

摘要: 题目要求 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farth 阅读全文
posted @ 2019-02-28 09:24 锋上磬音 阅读(160) 评论(0) 推荐(0) 编辑

LeetCode 575 Distribute Candies 解题报告

摘要: 题目要求 Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy 阅读全文
posted @ 2019-02-27 09:28 锋上磬音 阅读(117) 评论(0) 推荐(0) 编辑

LeetCode 868 Binary Gap 解题报告

摘要: 题目要求 Given a positive integer N, find and return the longest distance between two consecutive 1's in the binary representation of N. If there aren't t 阅读全文
posted @ 2019-02-26 09:45 锋上磬音 阅读(126) 评论(0) 推荐(0) 编辑

LeetCode 669 Trim a Binary Search Tree 解题报告

摘要: 题目要求 Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You 阅读全文
posted @ 2019-02-25 09:52 锋上磬音 阅读(117) 评论(0) 推荐(0) 编辑

LeetCode 463 Island Perimeter 解题报告

摘要: 题目要求 You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontal 阅读全文
posted @ 2019-02-24 09:47 锋上磬音 阅读(127) 评论(0) 推荐(0) 编辑

LeetCode 682 Baseball Game 解题报告

摘要: 题目要求 You're now a baseball game point recorder. Given a list of strings, each string can be one of the 4 following types: Each round's operation is pe 阅读全文
posted @ 2019-02-23 14:54 锋上磬音 阅读(107) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页