Obtain forest out of tree with even number of nodes

后端 未结 8 602
别跟我提以往
别跟我提以往 2021-02-03 20:31

I\'m stuck on a code challenge, and I want a hint.

PROBLEM: You are given a tree data structure (without cycles) and are asked to remo

8条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-03 21:18

    My first inclination is to work up from the leaf nodes because you cannot cut their edges as that would leave single-vertex subtrees.

提交回复
热议问题