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 4cb1e9b

Browse files
author
Victor
authored
minor update.
1 parent 0b1193e commit 4cb1e9b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎1007. Minimum Domino Rotations For Equal Row.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ int minDominoRotations(int* A, int ASize, int* B, int BSize){
5454
if (!a_ok && !b_ok) return -1;
5555

5656
if (a_ok) {
57-
if (A[i] != A[0]) a_up ++; // flip up to make all are A[0] on top
58-
if (B[i] != A[0]) a_down ++; // flip down to make all are A[0] in bottom
57+
if (A[i] != A[0]) a_up ++; // flip up to make all are A[0] on top
58+
elseif (B[i] != A[0]) a_down ++; // flip down to make all are A[0] in bottom
5959
}
6060
if (b_ok) {
6161
if (B[i] != B[0]) b_down ++;
62-
if (A[i] != B[0]) b_up ++;
62+
elseif (A[i] != B[0]) b_up ++;
6363
}
6464
}
6565

0 commit comments

Comments
(0)

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