# (FB) Binary Tree Path 比较路径大小

<http://www.1point3acres.com/bbs/thread-128584-1-1.html>

第二道题是 给个Tree 不一定是平衡的， 要求 把所有路径排序后 按字符串那样的比较大小方法 找出最小的路径 时间要求线性的。 比如\
5 /  10 3 1 7 8

路径有 5 10 1 ； 5 10 7 ； 5 3 8

排序后 1 5 10 ； 5 7 10 ； 3 5 8

所以按字符串类型排序 为 1 5 10 < 3 5 8 < 5 7 10；


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mnunknown.gitbook.io/algorithm-notes/binary_tree/fb_binary_tree_path_bi_jiao_lu_jing_da_xiao.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
