[LeetCode] Maximum Average Subtree

1120. Maximum Average Subtree

Given the root of a binary tree, return the maximum average value of a subtree of that tree. Answers within 10-5 of the actual answer will be accepted.

A subtree of a tree is any node of that tree plus all its descendants.

The average value of a tree is the sum of its values, divided by the number of nodes.

Read more
[LeetCode] Remove Sub-Folders from the Filesystem

1233. Remove Sub-Folders from the Filesystem

Given a list of folders folder, return the folders after removing all sub-folders in those folders. You may return the answer in any order.

If a folder[i] is located within another folder[j], it is called a sub-folder of it.

The format of a path is one or more concatenated strings of the form: ‘/‘ followed by one or more lowercase English letters.

  • For example, “/leetcode” and “/leetcode/problems” are valid paths while an empty string and “/“ are not.
Read more
[Codeforces] Round #728 (Div. 1) A. Great GraphsRead more
[Codeforces] Round #736 (Div. 1) A. Web of LiesRead more
[Hacker Rank] Chief HopperRead more
[Hacker Rank] Xor-sequenceRead more
[Hacker Rank] EqualRead more
[Hacker Rank] Gridland MetroRead more
[Hacker Rank] Fraudulent Activity NotificationsRead more
LeetCode Contest BiWeekly 80 & Weekly 297 후기

후기

Read more