Skip to content

Commit 00307a8

Browse files
authored
Update Solution2.ts
1 parent cbb6a0e commit 00307a8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

solution/1500-1599/1550.Three Consecutive Odds/Solution2.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
function threeConsecutiveOdds(arr: number[]): boolean {
22
const n = arr.length;
3-
if (n < 3) return false;
4-
5-
for (let i = 2; i < n; i++) {
3+
for (let i = 2; i < n; ++i) {
64
if (arr[i - 2] & arr[i - 1] & arr[i] & 1) {
75
return true;
86
}

0 commit comments

Comments
 (0)