[Leetcode] 337. House Robber III | 打家劫舍 III

The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root
Leetcode 2020年02月05日 25次浏览

[Leetcode] Top-K系列问题总结

在本篇文章中,我将尝试总结一下Top-K系列问题。何谓Top-K问题,Top-K问题即类似: 215. Kth Largest Element in an Array | 数组中的第K个最大元素 692. Top K Frequent Words | 前K个高频单词 973. K Closest P
Leetcode 2020年02月05日 39次浏览

[Leetcode] 437. Path Sum III | 路径总和 III

You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t
Leetcode 2020年02月03日 26次浏览

[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]
Leetcode 2020年02月03日 25次浏览

[Leetcode] 282. Expression Add Operators | 给表达式添加运算符

Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the d
Leetcode 2020年02月03日 33次浏览

[Leetcode] 494. Target Sum | 目标和

You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose o
Leetcode 2020年02月03日 20次浏览

[Leetcode] 416. Partition Equal Subset Sum | 分割等和子集

Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both
Leetcode 2020年02月02日 35次浏览

[Leetcode] 560. Subarray Sum Equals K | 和为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 =
2020年02月02日 60次浏览

[Leetcode] 1343. Maximum Product of Splitted Binary Tree | 分裂二叉树的最大乘积

Given a binary tree root. Split the binary tree into two subtrees by removing 1 edge such that the product of the sums of the subtrees are maximized.
2020年02月02日 26次浏览