回复:女儿(high school)作业的一部分.她programmed了一天

来源: 2009-10-18 17:51:14 [博客] [旧帖] [给我悄悄话] 本文已被阅读:

sorted or unsorted binary tree?

1. For sorted binary tree: Use binary tree search algorithm to find the input number;

2. if it's unsorted, you got to use binary tree traversal algorithm to find the node;

3. Use delete node function to remove the found node.

They are standard tree operations, your kid could use google to find the code for java, don't do it from scratch.