- 链接地址:https://blog.csdn.net/weixin_30507269/article/details/102004089
- 链接标题:LeetCode 1145. Binary Tree Coloring Game-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:7384
文章浏览阅读113次。去年准备Google面试的时候就见过这道题,现在leetcode上竟然有了。对方的点把整个图(想象成一个graph)分为了三个部分,我们最优策略就是选择最大的那一枝,贴着对面的点放置我们的点。由此,这道题的本质变成了计算subtree节点数的题目。/** * Definition for a binary tree node. * struct TreeNode {..._binary tree coloring game
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除