Re: [闲聊] 每日leetcode

楼主: sustainer123 (caster)   2024-04-15 09:34:01
※ 引述《Rushia (早瀬ユウカの体操服 )》之铭言:
: 129. Sum Root to Leaf Numbers
: https://leetcode.com/problems/sum-root-to-leaf-numbers/description
: 给你一个二元树,求出所有的root到leaf节点的路径数字和。
: 思路:
: 1.普通dfs纪录路径中的数字和,如果当前点是leaf就累加。
: py code:
:
作者: SecondRun (雨夜琴声)   2024-04-15 11:28:00
大师

Links booklink

Contact Us: admin [ a t ] ucptt.com