Skip to content

Commit eb6186c

Browse files
committed
Erased all Chinese content.
1 parent a9b8086 commit eb6186c

3 files changed

Lines changed: 13 additions & 52 deletions

File tree

documents/alfred/data_structure/binary-trie.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ documentation_of: ./src/alfred/data_structure/binary-trie.hpp
77

88
This file implements a Binary Trie (01-Trie) data structure for efficiently storing and querying binary representations of integers. It supports insertion, minimum/maximum XOR queries, and range queries with upper bounds.
99

10-
本文件实现了支持下标和区间信息维护的 01-Trie(BinaryTrie),可用于集合异或最值、区间下标查询等。
11-
1210
## Usage Example
1311

1412
```cpp
@@ -25,10 +23,6 @@ uint64_t max_xor = trie.query_max(3);
2523
- Query for values with XOR less than an upper bound
2624
- Maintains min/max index for range queries
2725

28-
- 支持插入、异或最小/最大值查询
29-
- 支持下标区间信息维护
30-
- 支持 upper_bound 异或查询
31-
3226
## Important Functions and Time Complexity
3327

3428
| Function | Description | Time Complexity |
@@ -38,18 +32,8 @@ uint64_t max_xor = trie.query_max(3);
3832
| `query_max` | Maximize XOR with given value | $O(B)$ |
3933
| `query_ub` | Query for XOR < upper bound | $O(B)$ |
4034

41-
| Function | Description | Time Complexity |
42-
| ----------- | ------------------ | --------------- |
43-
| `insert` | 插入一个数 | $O(\log V)$ |
44-
| `query_min` | 查询异或最小值 | $O(\log V)$ |
45-
| `query_max` | 查询异或最大值 | $O(\log V)$ |
46-
| `query_ub` | 异或小于上界的区间 | $O(\log V)$ |
47-
4835
Where $B$ is the number of bits (default 30).
4936

5037
## Notes
5138
- Useful for problems involving XOR queries and binary representations.
5239
- Supports index tracking for advanced queries.
53-
54-
- 适用于集合异或、区间最值等问题。
55-
- 支持维护插入元素的下标信息。

documents/alfred/data_structure/discretization.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,10 @@ documentation_of: ./src/alfred/data_structure/discretization.hpp
55

66
## Description
77

8-
本文件实现了通用离散化工具类 `Mess`,用于将任意可比较类型的值映射到连续整数区间,便于后续高效处理。
9-
108
This file provides the Mess class, a utility for discretizing values in a vector, mapping them to a compact index range. It supports insertion, initialization, querying, and checking existence of values.
119

1210
## Usage Example
1311

14-
```cpp
15-
#include "discretization.hpp"
16-
std::vector<int> a = {100, 200, 100};
17-
Mess<int> mess(a);
18-
int idx = mess.query(200); // 查询 200 离散化后的编号
19-
```
20-
2112
```cpp
2213
#include "discretization.hpp"
2314
std::vector<int> a = {5, 2, 7};
@@ -26,25 +17,18 @@ int idx = mess.query(5); // Get discrete index of 5
2617
```
2718
2819
## Main Features
29-
- 支持批量插入、自动去重排序
30-
- 支持原值与离散编号互查
31-
- 支持判断元素是否存在
32-
33-
Discretizes values to compact indices
34-
Supports batch insertion and initialization
35-
Query for discrete index and check existence
20+
- Discretizes values to compact indices
21+
- Supports batch insertion and initialization
22+
- Query for discrete index and check existence
3623
3724
## Important Functions and Time Complexity
3825
39-
| Function | Description | Time Complexity |
40-
| -------- | ------------------ | --------------- |
41-
| `insert` | 插入元素 | $O(1)$ |
42-
| `init` | 初始化(排序去重) | $O(n \log n)$ |
43-
| `query` | 查询离散编号 | $O(\log n)$ |
44-
| `exist` | 判断元素是否存在 | $O(\log n)$ |
26+
| Function | Description | Time Complexity |
27+
| -------- | --------------------------------- | --------------- |
28+
| `insert` | Insert value | $O(1)$ |
29+
| `init` | Initialize and sort unique values | $O(n \log n)$ |
30+
| `query` | Get discrete index | $O(\log n)$ |
31+
| `exist` | Check if value exists | $O(\log n)$ |
4532
4633
## Notes
47-
- 适用于需要离散化处理的场景。
48-
- 支持任意可比较类型。
49-
50-
Useful for coordinate compression and mapping values to indices.
34+
- Useful for coordinate compression and mapping values to indices.

documents/alfred/data_structure/dsu/cancel-dsu.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ documentation_of: ./src/alfred/data_structure/dsu/cancel-dsu.hpp
55

66
## Description
77

8-
本文件实现了支持撤销操作的并查集(Cancelable DSU),可用于可回溯的合并查找问题。
9-
108
This file implements a cancelable Disjoint Set Union (DSU) data structure, also known as a union-find with rollback. It supports merging sets, checking connectivity, and undoing previous merge operations efficiently.
119

1210
## Usage Example
@@ -15,14 +13,10 @@ This file implements a cancelable Disjoint Set Union (DSU) data structure, also
1513
#include "cancel-dsu.hpp"
1614
CancelDSU dsu(5);
1715
dsu.merge(1, 2);
18-
dsu.cancel(); // 撤销上一次合并
1916
dsu.cancel(); // Undo last merge
2017
```
2118
2219
## Main Features
23-
- 支持撤销合并操作
24-
- 支持集合大小查询
25-
- 适合可回溯并查集场景
2620
- Supports union, find, and size queries
2721
- Allows rollback (cancel) of previous merge operations
2822
- Maintains history using a stack
@@ -31,11 +25,10 @@ dsu.cancel(); // Undo last merge
3125
3226
| Function | Description | Time Complexity |
3327
| -------- | ----------------------------------- | --------------- |
34-
| `merge` | 合并集合 | $O(\alpha(n))$ |
35-
| `cancel` | 撤销合并 | $O(1)$ |
36-
| `find` | 查找根节点 | $O(\alpha(n))$ |
28+
| `merge` | Merge two sets | $O(\alpha(n))$ |
29+
| `cancel` | Undo previous merge(s) | $O(1)$ |
30+
| `find` | Find representative | $O(\alpha(n))$ |
3731
| `same` | Check if two elements are connected | $O(\alpha(n))$ |
3832
3933
## Notes
40-
- 适用于需要撤销操作的并查集问题。
4134
- Useful for offline dynamic connectivity and backtracking problems.

0 commit comments

Comments
 (0)