You are also given a positive integer k, and a 0-indexed array of non-negative integers nums of length n, where nums[i] represents the value of the node numbered i. Alice wants the sum of values of tree nodes to be maximum, for which Alice can perform the following operation any ...
A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence at most once. Note that the path does not need to pass through the root. The path sum of a path is the sum of t...
A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence at most once. Note that the path does not need to pass through the root. The path sum of a path is the sum of t...
1161-maximum-level-sum-of-a-binary-tree.cpp 1189-maximum-number-of-balloons.cpp 1209-Remove-All-Adjacent-Duplicates-in-String-II.cpp 1209-remove-all-adjacent-duplicates-in-string-ii.cpp 1213-maximum-product-difference-between-two-pairs.cpp 1220-count-vowels-permutation.cpp 1260-shift-2d-grid.cp...
1047-remove-all-adjacent-duplicates-in-string 1071-greatest-common-divisor-of-strings 1072-flip-columns-for-maximum-number-of-equal-rows 1072-flip-columns-for-maximum-number-of-equal-rows.cpp NOTES.md README.md 1079-letter-tile-possibilities 1081-smallest-subsequence-of-distinct-ch...
1120-flower-planting-with-no-adjacent 1121-partition-array-for-maximum-sum 1138-grumpy-bookstore-owner 1145-number-of-submatrices-that-sum-to-target 1146-greatest-common-divisor-of-strings 118-pascals-triangle 1194-path-in-zigzag-labelled-binary-tree 1196-filling-bookcase-shelves 1207-delete-...
1161-maximum-level-sum-of-a-binary-tree.cpp 1189-maximum-number-of-balloons.cpp 1209-Remove-All-Adjacent-Duplicates-in-String-II.cpp 1209-remove-all-adjacent-duplicates-in-string-ii.cpp 1213-maximum-product-difference-between-two-pairs.cpp 1220-count-vowels-permutation.cpp 1260-shift-2d-grid.cp...