Last active
September 18, 2020 17:43
-
-
Save windmaomao/b876a4f2a96ef26bb1c333008300cb3d 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
// Map char into a int | |
private fun charValue(c: Char): Int = when (c) { | |
'(' -> 1 | |
')' -> -1 | |
else -> 0 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment