摘要: 第一题 题目链接:https://leetcode.cn/problems/lian-xu-zi-shu-zu-de-zui-da-he-lcof/ 个人题解:记录一个 \(maxsum\) 和一个 \(sum\),一个存答案,一个存每一次所找的最大值。 代码: class Solution { p 阅读全文
posted @ 2022-05-11 18:58 黑VS白-清墨 阅读(19) 评论(0) 推荐(0)
摘要: 题目链接:https://leetcode.cn/problems/serialize-and-deserialize-bst/ 个人题解:前序遍历+递归 代码: class Codec { public: // Encodes a tree to a single string. string s 阅读全文
posted @ 2022-05-11 18:54 黑VS白-清墨 阅读(36) 评论(0) 推荐(0)