File tree 5 files changed +71
-8
lines changed
5 files changed +71
-8
lines changed Original file line number Diff line number Diff line change 1
- # 《程序员面试金典》系列
2
- 地址:https://leetcode-cn.com/problemset/lcci/
1
+ # [ 《程序员面试金典(第 6 版)》系列] ( https://leetcode-cn.com/problemset/lcci/ )
2
+ 本书是原谷歌资深面试官的经验之作,帮助了许多想要加入脸书、苹果、谷歌等 IT 名企的求职者拿到 Dream offer。本专题的 100+ 编程面试题是在原书基础上精心挑选出来的,帮助你轻松应战 IT 名企技术面试。
3
+
4
+ ## [ 题解] ( https://github.com/doocs/leetcode/tree/master/lcci )
3
5
4
- ## 题解
5
6
```
6
7
.
7
8
├── README.md
13
14
└── 面试题 01.02. 判定是否互为字符重排
14
15
├── README.md
15
16
└── Solution.py
16
- ```
17
+ ```
18
+
19
+ ## 版权
20
+ 商业转载请联系 [ @yanglbme ] ( https://github.com/yanglbme ) 授权,非商业转载请注明出处。
Original file line number Diff line number Diff line change
1
+ # [ 面试题 01.03. URL化] ( https://leetcode-cn.com/problems/string-to-url-lcci/ )
2
+
3
+ ## 题目描述
4
+ URL化。编写一种方法,将字符串中的空格全部替换为 ` %20 ` 。假定该字符串尾部有足够的空间存放新增字符,并且知道字符串的“真实”长度。(注:用 ` Java ` 实现的话,请使用字符数组实现,以便直接在数组上操作。)
5
+
6
+ ** 示例1:**
7
+
8
+ ```
9
+ 输入:"Mr John Smith ", 13
10
+ 输出:"Mr%20John%20Smith"
11
+ ```
12
+
13
+ ** 示例2:**
14
+
15
+ ```
16
+ 输入:" ", 5
17
+ 输出:"%20%20%20%20%20"
18
+ ```
19
+
20
+ ** 提示:**
21
+
22
+ 1 . 字符串长度在[ 0, 500000] 范围内。
23
+
24
+ ## 解法
25
+ ### Python3
26
+ ``` python
27
+ class Solution :
28
+ def replaceSpaces (self , S : str , length : int ) -> str :
29
+ S = S[:length] if length < len (S) else S
30
+ return S.replace(' ' , ' %20' )
31
+ ```
32
+
33
+ ### Java
34
+ ``` java
35
+
36
+ ```
37
+
38
+ ### ...
39
+ ```
40
+
41
+ ```
Original file line number Diff line number Diff line change
1
+ class Solution :
2
+ def replaceSpaces (self , S : str , length : int ) -> str :
3
+ S = S [:length ] if length < len (S ) else S
4
+ return S .replace (' ' , '%20' )
Original file line number Diff line number Diff line change 1
- # 《剑指 Offer》系列
2
- 地址:https://leetcode-cn.com/problemset/lcof/
1
+ # [ 《剑指 Offer(第 2 版)》系列] ( https://leetcode-cn.com/problemset/lcof/ )
2
+ 本书精选谷歌、微软等知名IT企业的典型面试题,系统地总结了如何在面试时写出高质量代码,如何优化代码效率,以及分析、解决难题的常用方法。
3
+
4
+ ## [ 题解] ( https://github.com/doocs/leetcode/tree/master/lcci )
3
5
4
- ## 题解
5
6
```
6
7
.
7
8
├── README.md
8
9
├── template.md
9
10
└── 面试题03. 数组中重复的数字
10
11
├── README.md
11
12
└── Solution.py
12
- ```
13
+ ```
14
+
15
+ ## 版权
16
+ 商业转载请联系 [ @yanglbme ] ( https://github.com/yanglbme ) 授权,非商业转载请注明出处。
Original file line number Diff line number Diff line change @@ -32,3 +32,13 @@ class Solution:
32
32
nums[i], nums[num] = nums[num], nums[i]
33
33
34
34
```
35
+
36
+ ### Java
37
+ ``` java
38
+
39
+ ```
40
+
41
+ ### ...
42
+ ```
43
+
44
+ ```
You can’t perform that action at this time.
0 commit comments