# Trees and Graphs

- [Directory Sum](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/directory_sum.md)
- [Largest Subtree](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/largest-subtree.md)
- [Shortest Path DAG Source to Sink](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/lowest-cost-path-in-graph-from-a-to-b.md)
- [HTML Parser](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/html-parser.md)
- [Infix to Postfix Expression Evaluater](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/infix-to-postfix-expression-evaluater.md)
- [Longest Path in Undirected Acyclic Graph](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/longest-path-in-undirected-acyclic-graph.md)
- [Decompress String](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/uncompress-string.md)
- [Pythagoras Tree](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/pythagoras-tree.md)
- [Kings](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/kings.md)
- [All Paths](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/all_paths.md)
- [Leaf Nodes](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/leaf-nodes.md)
- [Proper Locking](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/proper-locking.md)
- [Number of Cities at each Distance](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/number-of-cities-at-each-distance.md)
- [Root Path as DLL](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/root-path-as-dll.md)
- [Binary Replacement](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/binary-replacement.md)
- [All Root to Leaf Paths](https://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs/all_root_to_leaf_paths.md)


---

# 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://maksimdan.gitbook.io/interview-practice-problems/leetcode_sessions/trees-and-graphs.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.
