# Page Not Found

The URL `Longest Substring with At Most K Distinct Characters` does not exist. This page may have been moved, renamed, or deleted.

## Suggested Pages

You may be looking for one of the following:
- [(FB) Rearrange String k Distance Apart](https://mnunknown.gitbook.io/algorithm-notes/gao_989129_rearrange_string_k_distance_apart.md)
- [String，字符串类](https://mnunknown.gitbook.io/algorithm-notes/stringff0c_zi_fu_chuan_lei.md)
- [Shortest Word Distance 类](https://mnunknown.gitbook.io/algorithm-notes/linkedin_mian_jing/shortest_word_distance_lei.md)
- [Segment & Fenwick Tree，区间树](https://mnunknown.gitbook.io/algorithm-notes/segment_and_fenwick_tree.md)
- [Dynamic Programming, 动态规划](https://mnunknown.gitbook.io/algorithm-notes/dong_tai_gui_hua.md)

## How to find the correct page

If the exact page cannot be found, you can still retrieve the information using the documentation query interface.

### Option 1 — Ask a question (recommended)

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mnunknown.gitbook.io/algorithm-notes/gao_989129_rearrange_string_k_distance_apart.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

### Option 2 — Browse the documentation index

Full index: https://mnunknown.gitbook.io/algorithm-notes/sitemap.md

Use this to discover valid page paths or navigate the documentation structure.

### Option 3 — Retrieve the full documentation corpus

Full export: https://mnunknown.gitbook.io/algorithm-notes/llms-full.txt

Use this to access all content at once and perform your own parsing or retrieval. It will be more expensive.

## Tips for requesting documentation

Prefer `.md` URLs for structured content, append `.md` to URLs (e.g., `/algorithm-notes/gao_989129_rearrange_string_k_distance_apart.md`).

You may also use `Accept: text/markdown` header for content negotiation.
