Java Algorithm for finding the largest set of independent nodes in a binary tree

前端 未结 3 476
小蘑菇
小蘑菇 2021-01-14 10:13

By independent nodes, I mean that the returned set can not contain nodes that are in immediate relations, parent and child cannot both be included. I tried to use Google, wi

3条回答
  •  孤独总比滥情好
    2021-01-14 11:03

    I've provided an answer to a question for the same problem, although the solution is in python, the explanation, algorithm, and test cases could be applicable.

提交回复
热议问题