Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 56f3780

Browse files
更新 哈希表额外题目 排版格式修复
1 parent dc9fb7c commit 56f3780

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

‎problems/0205.同构字符串.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
提示:可以假设 s 和 t 长度相同。
3131

32-
# 思路
32+
## 思路
3333

3434
字符串没有说都是小写字母之类的,所以用数组不合适了,用map来做映射。
3535

@@ -61,9 +61,9 @@ public:
6161
```
6262
6363
64-
# 其他语言版本
64+
## 其他语言版本
6565
66-
## Java
66+
### Java
6767
6868
```java
6969
class Solution {
@@ -87,7 +87,7 @@ class Solution {
8787
}
8888
```
8989

90-
## Python
90+
### Python
9191

9292
```python
9393
class Solution:
@@ -110,7 +110,7 @@ class Solution:
110110
return True
111111
```
112112

113-
## Go
113+
### Go
114114

115115
```go
116116
func isIsomorphic(s string, t string) bool {
@@ -132,7 +132,7 @@ func isIsomorphic(s string, t string) bool {
132132
}
133133
```
134134

135-
## JavaScript
135+
### JavaScript
136136

137137
```js
138138
var isIsomorphic = function(s, t) {
@@ -156,7 +156,7 @@ var isIsomorphic = function(s, t) {
156156
};
157157
```
158158

159-
## TypeScript
159+
### TypeScript
160160

161161
```typescript
162162
function isIsomorphic(s: string, t: string): boolean {
@@ -183,3 +183,4 @@ function isIsomorphic(s: string, t: string): boolean {
183183
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
184184
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
185185
</a>
186+

‎problems/0234.回文链表.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,3 +432,4 @@ function reverseList(head: ListNode | null): ListNode | null {
432432
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
433433
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
434434
</a>
435+

‎problems/1002.查找常用字符.md‎

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ words[i] 由小写英文字母组成
3030

3131

3232

33-
# 思路
33+
## 思路
3434

3535
这道题意一起就有点绕,不是那么容易懂,其实就是26个小写字符中有字符 在所有字符串里都出现的话,就输出,重复的也算。
3636

@@ -140,7 +140,7 @@ public:
140140

141141
## 其他语言版本
142142

143-
Java:
143+
### Java:
144144

145145
```Java
146146
class Solution {
@@ -174,7 +174,8 @@ class Solution {
174174
}
175175
}
176176
```
177-
Python
177+
### Python
178+
178179
```python
179180
class Solution:
180181
def commonChars(self, words: List[str]) -> List[str]:
@@ -218,7 +219,8 @@ class Solution:
218219
return l
219220
```
220221

221-
javaScript
222+
### JavaScript
223+
222224
```js
223225
var commonChars = function (words) {
224226
let res = []
@@ -285,7 +287,8 @@ var commonChars = function(words) {
285287
}
286288
```
287289

288-
TypeScript
290+
### TypeScript
291+
289292
```ts
290293
console.time("test")
291294
let str: string = ""
@@ -321,7 +324,8 @@ TypeScript
321324
return str.split("")
322325
```
323326

324-
GO
327+
### GO
328+
325329
```golang
326330
func commonChars(words []string) []string {
327331
length:=len(words)
@@ -357,7 +361,8 @@ func min(a,b int)int{
357361
}
358362
```
359363

360-
Swift:
364+
### Swift:
365+
361366
```swift
362367
func commonChars(_ words: [String]) -> [String] {
363368
var res = [String]()
@@ -397,7 +402,8 @@ func commonChars(_ words: [String]) -> [String] {
397402
}
398403
```
399404

400-
C:
405+
### C:
406+
401407
```c
402408
//若两个哈希表定义为char数组(每个单词的最大长度不会超过100,因此可以用char表示),可以提高时间和空间效率
403409
void updateHashTable(int* hashTableOne, int* hashTableTwo) {
@@ -449,7 +455,8 @@ char ** commonChars(char ** words, int wordsSize, int* returnSize){
449455
return ret;
450456
}
451457
```
452-
Scala:
458+
### Scala:
459+
453460
```scala
454461
object Solution {
455462
def commonChars(words: Array[String]): List[String] = {
@@ -483,7 +490,7 @@ object Solution {
483490
}
484491
```
485492

486-
Rust:
493+
### Rust:
487494

488495
```rust
489496
impl Solution {
@@ -522,3 +529,4 @@ impl Solution {
522529
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
523530
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
524531
</a>
532+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /