帮忙看看这个女孩子的心态吧 (转载)# Joke - 肚皮舞运动
r*t
1 楼
cracking coding interview. I copy/paste the question below
4.8
You are given a binary tree in which each node contains a value. Design an
algorithm to print all paths which sum up to that value. Note that it can be
any path in the tree - it does not have to start at the root.
读得气不打一处:does "that value" refer to "a value" in the previous
sentence? If it is, on which node? if that does not matter (why the hell
would it not matter?), would every node contain the same value as "a value"?
看来必须看答案才能明白题意了。。。
4.8
You are given a binary tree in which each node contains a value. Design an
algorithm to print all paths which sum up to that value. Note that it can be
any path in the tree - it does not have to start at the root.
读得气不打一处:does "that value" refer to "a value" in the previous
sentence? If it is, on which node? if that does not matter (why the hell
would it not matter?), would every node contain the same value as "a value"?
看来必须看答案才能明白题意了。。。