摘要: Given the root of a binary tree, the depth of each node is the shortest distance to the root. Return the smallest subtree such that it contains all th 阅读全文
posted @ 2020-12-13 14:30 CNoodle 阅读(248) 评论(0) 推荐(0)
摘要: A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The 阅读全文
posted @ 2020-12-13 10:29 CNoodle 阅读(470) 评论(0) 推荐(0)
摘要: Let's define a function f(s) over a non-empty string s, which calculates the frequency of the smallest character in s. For example, if s = "dcce" then 阅读全文
posted @ 2020-12-13 09:12 CNoodle 阅读(239) 评论(0) 推荐(0)