Skip to content

Commit 5cacd70

Browse files
committed
feat: update lc problems
1 parent 3d25a5c commit 5cacd70

File tree

204 files changed

+5841
-5159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+5841
-5159
lines changed

lcci/03.03.Stack of Plates/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
```python
4141

42+
4243
```
4344

4445
### **Java**
@@ -47,6 +48,7 @@
4748

4849
```java
4950

51+
5052
```
5153

5254
### **TypeScript**
@@ -113,6 +115,7 @@ class StackOfPlates {
113115

114116
```
115117
118+
116119
```
117120

118121
<!-- tabs:end -->

lcci/03.03.Stack of Plates/README_EN.md

+16
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,59 @@
1313
<pre>
1414

1515

16+
1617
<strong> Input</strong>:
1718

1819

20+
1921
[&quot;StackOfPlates&quot;, &quot;push&quot;, &quot;push&quot;, &quot;popAt&quot;, &quot;pop&quot;, &quot;pop&quot;]
2022

2123

24+
2225
[[1], [1], [2], [1], [], []]
2326

2427

28+
2529
<strong> Output</strong>:
2630

2731

32+
2833
[null, null, null, 2, 1, -1]
2934

3035

36+
3137
<strong> Explanation</strong>:
3238

3339

40+
3441
</pre>
3542

3643
<p><strong>Example2:</strong></p>
3744

3845
<pre>
3946

4047

48+
4149
<strong> Input</strong>:
4250

4351

52+
4453
[&quot;StackOfPlates&quot;, &quot;push&quot;, &quot;push&quot;, &quot;push&quot;, &quot;popAt&quot;, &quot;popAt&quot;, &quot;popAt&quot;]
4554

4655

56+
4757
[[2], [1], [2], [3], [0], [0], [0]]
4858

4959

60+
5061
<strong> Output</strong>:
5162

5263

64+
5365
[null, null, null, null, 2, 1, 3]
5466

5567

68+
5669
</pre>
5770

5871
## Solutions
@@ -63,12 +76,14 @@
6376

6477
```python
6578

79+
6680
```
6781

6882
### **Java**
6983

7084
```java
7185

86+
7287
```
7388

7489
### **TypeScript**
@@ -135,6 +150,7 @@ class StackOfPlates {
135150

136151
```
137152
153+
138154
```
139155

140156
<!-- tabs:end -->

lcci/04.09.BST Sequences/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
```python
3737

38+
3839
```
3940

4041
### **Java**
@@ -43,12 +44,14 @@
4344

4445
```java
4546

47+
4648
```
4749

4850
### **...**
4951

5052
```
5153
54+
5255
```
5356

5457
<!-- tabs:end -->

lcci/04.09.BST Sequences/README_EN.md

+12
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,43 @@ Given the following tree:</p>
1313
<pre>
1414

1515

16+
1617
2
1718

1819

20+
1921
/ \
2022

2123

24+
2225
1 3
2326

2427

28+
2529
</pre>
2630

2731
<p>Output:</p>
2832

2933
<pre>
3034

3135

36+
3237
[
3338

3439

40+
3541
[2,1,3],
3642

3743

44+
3845
[2,3,1]
3946

4047

48+
4149
]
4250

4351

52+
4453
</pre>
4554

4655
## Solutions
@@ -51,18 +60,21 @@ Given the following tree:</p>
5160

5261
```python
5362

63+
5464
```
5565

5666
### **Java**
5767

5868
```java
5969

70+
6071
```
6172

6273
### **...**
6374

6475
```
6576
77+
6678
```
6779

6880
<!-- tabs:end -->

lcci/05.01.Insert Into Bits/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
```python
3535

36+
3637
```
3738

3839
### **Java**
@@ -54,6 +55,7 @@ class Solution {
5455

5556
```
5657
58+
5759
```
5860

5961
<!-- tabs:end -->

lcci/05.01.Insert Into Bits/README_EN.md

+8
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,31 @@
1111
<pre>
1212

1313

14+
1415
<strong> Input</strong>: N = 10000000000, M = 10011, i = 2, j = 6
1516

1617

18+
1719
<strong> Output</strong>: N = 10001001100
1820

1921

22+
2023
</pre>
2124

2225
<p><strong>Example2:</strong></p>
2326

2427
<pre>
2528

2629

30+
2731
<strong> Input</strong>: N = 0, M = 11111, i = 0, j = 4
2832

2933

34+
3035
<strong> Output</strong>: N = 11111
3136

3237

38+
3339
</pre>
3440

3541
## Solutions
@@ -40,6 +46,7 @@
4046

4147
```python
4248

49+
4350
```
4451

4552
### **Java**
@@ -59,6 +66,7 @@ class Solution {
5966

6067
```
6168
69+
6270
```
6371

6472
<!-- tabs:end -->

lcci/05.02.Bianry Number to String/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
```python
4040

41+
4142
```
4243

4344
### **Java**
@@ -46,12 +47,14 @@
4647

4748
```java
4849

50+
4951
```
5052

5153
### **...**
5254

5355
```
5456
57+
5558
```
5659

5760
<!-- tabs:end -->

lcci/05.02.Bianry Number to String/README_EN.md

+10
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,35 @@
1111
<pre>
1212

1313

14+
1415
<strong> Input</strong>: 0.625
1516

1617

18+
1719
<strong> Output</strong>: &quot;0.101&quot;
1820

1921

22+
2023
</pre>
2124

2225
<p><strong>Example2:</strong></p>
2326

2427
<pre>
2528

2629

30+
2731
<strong> Input</strong>: 0.1
2832

2933

34+
3035
<strong> Output</strong>: &quot;ERROR&quot;
3136

3237

38+
3339
<strong> Note</strong>: 0.1 cannot be represented accurately in binary.
3440

3541

42+
3643
</pre>
3744

3845
<p><strong>Note: </strong></p>
@@ -49,18 +56,21 @@
4956

5057
```python
5158

59+
5260
```
5361

5462
### **Java**
5563

5664
```java
5765

66+
5867
```
5968

6069
### **...**
6170

6271
```
6372
73+
6474
```
6575

6676
<!-- tabs:end -->

lcci/05.03.Reverse Bits/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
```python
3333

34+
3435
```
3536

3637
### **Java**
@@ -39,12 +40,14 @@
3940

4041
```java
4142

43+
4244
```
4345

4446
### **...**
4547

4648
```
4749
50+
4851
```
4952

5053
<!-- tabs:end -->

0 commit comments

Comments
 (0)