Skip to content

Commit 2ffee30

Browse files
committed
fix: length is too long
1 parent c6b450c commit 2ffee30

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

solution/1400-1499/1460.Make Two Arrays Equal by Reversing Sub-arrays/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function canBeEqual(target: number[], arr: number[]): boolean {
220220
```ts
221221
function canBeEqual(target: number[], arr: number[]): boolean {
222222
const n = target.length;
223-
const count = new Array(10001).fill(0);
223+
const count = new Array(1001).fill(0);
224224
for (let i = 0; i < n; i++) {
225225
count[target[i]]++;
226226
count[arr[i]]--;

solution/1400-1499/1460.Make Two Arrays Equal by Reversing Sub-arrays/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function canBeEqual(target: number[], arr: number[]): boolean {
192192
```ts
193193
function canBeEqual(target: number[], arr: number[]): boolean {
194194
const n = target.length;
195-
const count = new Array(10001).fill(0);
195+
const count = new Array(1001).fill(0);
196196
for (let i = 0; i < n; i++) {
197197
count[target[i]]++;
198198
count[arr[i]]--;

solution/1400-1499/1460.Make Two Arrays Equal by Reversing Sub-arrays/Solution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function canBeEqual(target: number[], arr: number[]): boolean {
22
const n = target.length;
3-
const count = new Array(10001).fill(0);
3+
const count = new Array(1001).fill(0);
44
for (let i = 0; i < n; i++) {
55
count[target[i]]++;
66
count[arr[i]]--;

0 commit comments

Comments
 (0)