Created
September 30, 2023 06:39
-
-
Save drawers/9cae2078b38c2bcdf0ef88373d7024cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (count == 0) { | |
candidate = num | |
} | |
if (num == candidate) { | |
count++ | |
} else { | |
count-- | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment