Created
September 7, 2020 15:47
-
-
Save bky373/d2a1a3a2a8888b29c039c1a30ec9c9ce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Solution { | |
fun solution(s: String): Boolean { | |
val chars = s.toCharArray() | |
return chars.all{ it.isDigit() } && (chars.size == 4 || chars.size == 6) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment