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 6815131

Browse files
fix: update code blocks (doocs#2210)
1 parent b5b461b commit 6815131

File tree

5 files changed

+8
-163
lines changed

5 files changed

+8
-163
lines changed

‎solution/1400-1499/1438.Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit/README.md‎

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func longestSubarray(nums []int, limit int) (ans int) {
165165

166166
### **TypeScript**
167167

168-
````ts
168+
```ts
169169
function longestSubarray(nums: number[], limit: number): number {
170170
const ts = new TreapMultiSet<number>();
171171
let ans = 0;
@@ -281,37 +281,6 @@ class TreapMultiSet<T = number> implements ITreapMultiSet<T> {
281281
private readonly leftBound: T;
282282
private readonly rightBound: T;
283283

284-
/**
285-
*
286-
* @param compareFn A compare function which returns boolean or number
287-
* @param leftBound defalut value is `-Infinity`
288-
* @param rightBound defalut value is `Infinity`
289-
* @description
290-
* create a `MultiSet`, compare elements using `compareFn`, which is increasing order by default.
291-
* @example
292-
* ```ts
293-
* interface Person {
294-
name: string
295-
age: number
296-
}
297-
298-
const leftBound = {
299-
name: 'Alice',
300-
age: -Infinity,
301-
}
302-
303-
const rightBound = {
304-
name: 'Bob',
305-
age: Infinity,
306-
}
307-
308-
const sortedList = new TreapMultiSet<Person>(
309-
(a: Person, b: Person) => a.age - b.age,
310-
leftBound,
311-
rightBound
312-
)
313-
* ```
314-
*/
315284
constructor(compareFn?: CompareFunction<T, 'number'>);
316285
constructor(compareFn: CompareFunction<T, 'number'>, leftBound: T, rightBound: T);
317286
constructor(
@@ -828,7 +797,7 @@ class TreapMultiSet<T = number> implements ITreapMultiSet<T> {
828797
yield* this.reverseInOrder(root.left);
829798
}
830799
}
831-
````
800+
```
832801

833802
### **...**
834803

‎solution/1400-1499/1438.Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit/README_EN.md‎

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func longestSubarray(nums []int, limit int) (ans int) {
150150

151151
### **TypeScript**
152152

153-
````ts
153+
```ts
154154
function longestSubarray(nums: number[], limit: number): number {
155155
const ts = new TreapMultiSet<number>();
156156
let ans = 0;
@@ -266,37 +266,6 @@ class TreapMultiSet<T = number> implements ITreapMultiSet<T> {
266266
private readonly leftBound: T;
267267
private readonly rightBound: T;
268268

269-
/**
270-
*
271-
* @param compareFn A compare function which returns boolean or number
272-
* @param leftBound defalut value is `-Infinity`
273-
* @param rightBound defalut value is `Infinity`
274-
* @description
275-
* create a `MultiSet`, compare elements using `compareFn`, which is increasing order by default.
276-
* @example
277-
* ```ts
278-
* interface Person {
279-
name: string
280-
age: number
281-
}
282-
283-
const leftBound = {
284-
name: 'Alice',
285-
age: -Infinity,
286-
}
287-
288-
const rightBound = {
289-
name: 'Bob',
290-
age: Infinity,
291-
}
292-
293-
const sortedList = new TreapMultiSet<Person>(
294-
(a: Person, b: Person) => a.age - b.age,
295-
leftBound,
296-
rightBound
297-
)
298-
* ```
299-
*/
300269
constructor(compareFn?: CompareFunction<T, 'number'>);
301270
constructor(compareFn: CompareFunction<T, 'number'>, leftBound: T, rightBound: T);
302271
constructor(
@@ -813,7 +782,7 @@ class TreapMultiSet<T = number> implements ITreapMultiSet<T> {
813782
yield* this.reverseInOrder(root.left);
814783
}
815784
}
816-
````
785+
```
817786

818787
### **...**
819788

‎solution/1400-1499/1438.Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit/Solution.ts‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -113,37 +113,6 @@ class TreapMultiSet<T = number> implements ITreapMultiSet<T> {
113113
private readonly leftBound: T;
114114
private readonly rightBound: T;
115115

116-
/**
117-
*
118-
* @param compareFn A compare function which returns boolean or number
119-
* @param leftBound defalut value is `-Infinity`
120-
* @param rightBound defalut value is `Infinity`
121-
* @description
122-
* create a `MultiSet`, compare elements using `compareFn`, which is increasing order by default.
123-
* @example
124-
* ```ts
125-
* interface Person {
126-
name: string
127-
age: number
128-
}
129-
130-
const leftBound = {
131-
name: 'Alice',
132-
age: -Infinity,
133-
}
134-
135-
const rightBound = {
136-
name: 'Bob',
137-
age: Infinity,
138-
}
139-
140-
const sortedList = new TreapMultiSet<Person>(
141-
(a: Person, b: Person) => a.age - b.age,
142-
leftBound,
143-
rightBound
144-
)
145-
* ```
146-
*/
147116
constructor(compareFn?: CompareFunction<T, 'number'>);
148117
constructor(compareFn: CompareFunction<T, 'number'>, leftBound: T, rightBound: T);
149118
constructor(

‎solution/2600-2699/2612.Minimum Reverse Operations/README.md‎

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ class TreeMultiSet<T = number> {
916916
}
917917
```
918918

919-
````ts
919+
```ts
920920
function minReverseOperations(n: number, p: number, banned: number[], k: number): number[] {
921921
const ans = new Array(n).fill(-1);
922922
const ts = new Array(2).fill(0).map(() => new TreapMultiSet<number>());
@@ -1049,37 +1049,6 @@ class TreapMultiSet<T = number> implements ITreapMultiSet<T> {
10491049
private readonly leftBound: T;
10501050
private readonly rightBound: T;
10511051

1052-
/**
1053-
*
1054-
* @param compareFn A compare function which returns boolean or number
1055-
* @param leftBound defalut value is `-Infinity`
1056-
* @param rightBound defalut value is `Infinity`
1057-
* @description
1058-
* create a `MultiSet`, compare elements using `compareFn`, which is increasing order by default.
1059-
* @example
1060-
* ```ts
1061-
* interface Person {
1062-
name: string
1063-
age: number
1064-
}
1065-
1066-
const leftBound = {
1067-
name: 'Alice',
1068-
age: -Infinity,
1069-
}
1070-
1071-
const rightBound = {
1072-
name: 'Bob',
1073-
age: Infinity,
1074-
}
1075-
1076-
const sortedList = new TreapMultiSet<Person>(
1077-
(a: Person, b: Person) => a.age - b.age,
1078-
leftBound,
1079-
rightBound
1080-
)
1081-
* ```
1082-
*/
10831052
constructor(compareFn?: CompareFunction<T, 'number'>);
10841053
constructor(compareFn: CompareFunction<T, 'number'>, leftBound: T, rightBound: T);
10851054
constructor(
@@ -1596,7 +1565,7 @@ class TreapMultiSet<T = number> implements ITreapMultiSet<T> {
15961565
yield* this.reverseInOrder(root.left);
15971566
}
15981567
}
1599-
````
1568+
```
16001569

16011570
### **...**
16021571

‎solution/2600-2699/2612.Minimum Reverse Operations/README_EN.md‎

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ class TreeMultiSet<T = number> {
902902
}
903903
```
904904

905-
````ts
905+
```ts
906906
function minReverseOperations(n: number, p: number, banned: number[], k: number): number[] {
907907
const ans = new Array(n).fill(-1);
908908
const ts = new Array(2).fill(0).map(() => new TreapMultiSet<number>());
@@ -1035,37 +1035,6 @@ class TreapMultiSet<T = number> implements ITreapMultiSet<T> {
10351035
private readonly leftBound: T;
10361036
private readonly rightBound: T;
10371037

1038-
/**
1039-
*
1040-
* @param compareFn A compare function which returns boolean or number
1041-
* @param leftBound defalut value is `-Infinity`
1042-
* @param rightBound defalut value is `Infinity`
1043-
* @description
1044-
* create a `MultiSet`, compare elements using `compareFn`, which is increasing order by default.
1045-
* @example
1046-
* ```ts
1047-
* interface Person {
1048-
name: string
1049-
age: number
1050-
}
1051-
1052-
const leftBound = {
1053-
name: 'Alice',
1054-
age: -Infinity,
1055-
}
1056-
1057-
const rightBound = {
1058-
name: 'Bob',
1059-
age: Infinity,
1060-
}
1061-
1062-
const sortedList = new TreapMultiSet<Person>(
1063-
(a: Person, b: Person) => a.age - b.age,
1064-
leftBound,
1065-
rightBound
1066-
)
1067-
* ```
1068-
*/
10691038
constructor(compareFn?: CompareFunction<T, 'number'>);
10701039
constructor(compareFn: CompareFunction<T, 'number'>, leftBound: T, rightBound: T);
10711040
constructor(
@@ -1582,7 +1551,7 @@ class TreapMultiSet<T = number> implements ITreapMultiSet<T> {
15821551
yield* this.reverseInOrder(root.left);
15831552
}
15841553
}
1585-
````
1554+
```
15861555

15871556
### **...**
15881557

0 commit comments

Comments
(0)

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