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 c69afed

Browse files
fix: rm topic6 question from topic5
1 parent 387e53e commit c69afed

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

‎Topic5/index.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,3 @@ while (e < arr10.length) {
116116
e++;
117117
}
118118
console.log(arr10);
119-
120-
// left rotation by 1 element
121-
let arr11 = [1, 2, 3, 4];
122-
let copy = arr11[0];
123-
124-
for (let i = 0; i < arr11.length - 1; i++) {
125-
arr11[i] = arr11[i + 1];
126-
}
127-
arr11[arr11.length - 1] = copy;
128-
console.log(arr11);
129-
130-
// right rotation by 1 element
131-
let arr12 = [1, 2, 3, 4, 5];
132-
let copyarr12 = arr12[arr12.length - 1];
133-
134-
for (let i = arr.length - 1; i > 0; i--) {
135-
arr12[i] = arr12[i - 1];
136-
}
137-
arr12[0] = copyarr12;
138-
console.log(arr12);

0 commit comments

Comments
(0)

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