Organizing all the code blocks.

This commit is contained in:
Yudong Jin
2022-12-03 01:31:29 +08:00
parent fec56afd5f
commit 9bd5980a81
21 changed files with 2520 additions and 310 deletions

View File

@@ -40,6 +40,42 @@ comments: true
}
```
=== "Python"
```python title="hashing_search.py"
```
=== "Go"
```go title="hashing_search.go"
```
=== "JavaScript"
```js title="hashing_search.js"
```
=== "TypeScript"
```typescript title="hashing_search.ts"
```
=== "C"
```c title="hashing_search.c"
```
=== "C#"
```csharp title="hashing_search.cs"
```
再比如,如果我们想要给定一个目标结点值 `target` ,获取对应的链表结点对象,那么也可以使用哈希查找实现。
![hash_search_listnode](hashing_search.assets/hash_search_listnode.png)
@@ -68,6 +104,42 @@ comments: true
}
```
=== "Python"
```python title="hashing_search.py"
```
=== "Go"
```go title="hashing_search.go"
```
=== "JavaScript"
```js title="hashing_search.js"
```
=== "TypeScript"
```typescript title="hashing_search.ts"
```
=== "C"
```c title="hashing_search.c"
```
=== "C#"
```csharp title="hashing_search.cs"
```
## 复杂度分析
**时间复杂度:** $O(1)$ ,哈希表的查找操作使用 $O(1)$ 时间。