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

LeetCode 448 Find All Numbers Disappeared in an Array 解题报告

摘要: 题目要求 Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1 阅读全文
posted @ 2019-04-03 08:39 锋上磬音 阅读(93) 评论(0) 推荐(0) 编辑

LeetCode 1013 Partition Array Into Three Parts With Equal Sum 解题报告

摘要: 题目要求 Given an array A of integers, return true if and only if we can partition the array into three non-empty parts with equal sums. Formally, we can 阅读全文
posted @ 2019-04-02 09:55 锋上磬音 阅读(229) 评论(0) 推荐(0) 编辑

LeetCode 521 Longest Uncommon Subsequence I 解题报告

摘要: 题目要求 Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is 阅读全文
posted @ 2019-04-01 11:21 锋上磬音 阅读(89) 评论(0) 推荐(0) 编辑

LeetCode 788 Rotated Digits 解题报告

摘要: 题目要求 X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be r 阅读全文
posted @ 2019-03-31 09:47 锋上磬音 阅读(96) 评论(0) 推荐(0) 编辑

LeetCode 206 Reverse Linked List 解题报告

摘要: 题目要求 Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL 题目分析及思路 给定一个单链表,要求得到它的逆序。可以使用列表对链表结点进行保存,之后新建一个列表对链 阅读全文
posted @ 2019-03-30 09:25 锋上磬音 阅读(131) 评论(0) 推荐(0) 编辑

LeetCode 690 Employee Importance 解题报告

摘要: 题目要求 You are given a data structure of employee information, which includes the employee's unique id, his importance value and his direct subordinates 阅读全文
posted @ 2019-03-29 09:41 锋上磬音 阅读(85) 评论(0) 推荐(0) 编辑

LeetCode 349 Intersection of Two Arrays 解题报告

摘要: 题目要求 Given two arrays, write a function to compute their intersection. 题目分析及思路 给定两个数组,要求得到它们之中共同拥有的元素列表(列表中元素是唯一的)。可以将所给数组转成集合,利用集合的交集的概念,最后将结果转成列表即可。 阅读全文
posted @ 2019-03-28 09:28 锋上磬音 阅读(75) 评论(0) 推荐(0) 编辑

LeetCode 258 Add Digits 解题报告

摘要: 题目要求 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. 题目分析及思路 给定一个非负整数,要求将它的各位数相加得到一个新数并对该新数重复进行这样 阅读全文
posted @ 2019-03-27 09:31 锋上磬音 阅读(90) 评论(0) 推荐(0) 编辑

LeetCode 748 Shortest Completing Word 解题报告

摘要: 题目要求 Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to comple 阅读全文
posted @ 2019-03-26 09:57 锋上磬音 阅读(165) 评论(0) 推荐(0) 编辑

LeetCode 283 Move Zeroes 解题报告

摘要: 题目要求 Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. 题目分析及思路 给定一 阅读全文
posted @ 2019-03-25 10:00 锋上磬音 阅读(85) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页