阅读背景:

给定一个树结构,你如何使用递归使其成为一个简单的链接列表?

来源:互联网 

Given a binary tree (with left and right child only), how do you write a recursive function to make it into a simple linked list in-place? (no new data structure should be created. Pseudo code is ok). Suppose each node has an integer value, like 123, or 2, or 3. The final link list should have all the nodes in the tree. The order is not important.Given a binary tree (with left and right child




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: