leetcode题解
文章平均质量分 62
webster_z
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
leetcode.442. Find All Duplicates in an Array
题目:Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appear twice in this array.Could you do it without extra s...原创 2018-04-01 14:33:39 · 115 阅读 · 0 评论 -
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, n] inclusive that do not appear in this array.Could yo...原创 2018-04-01 15:37:36 · 134 阅读 · 0 评论 -
leetcode.238. Product of Array Except Self
Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without division and in O(n).F...原创 2018-04-01 16:45:27 · 137 阅读 · 0 评论 -
leetcode.652. Find Duplicate Subtrees
Given a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any oneof them.Two trees are duplicate if they have the same structure...原创 2018-04-09 16:06:58 · 367 阅读 · 0 评论 -
leetcode.115. Distinct Subsequences
题目描述:Given a string S and a string T, count the number of distinct subsequences of S which equals T.A subsequence of a string is a new string which is formed from the original string by deleting some ...原创 2018-04-10 15:15:42 · 200 阅读 · 0 评论 -
leetcode.560. Subarray Sum Equals K
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k.Example 1:Input:nums = [1,1,1], k = 2 Output: 2 Note:The length of the arra...原创 2018-04-04 09:47:40 · 146 阅读 · 0 评论 -
leetcode.611. Valid Triangle Number
Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we take them as side lengths of a triangle.Example 1:Inp...原创 2018-04-04 10:48:46 · 139 阅读 · 0 评论
分享