Generate Parentheses in Kotlin
I wanted to create a program that displays all valid arrangements for n couple of parentheses. The output should be an array sorted in ascending order of ASCII values. The following is the function that needs to be used.
fun solution(n: Array): Array {
}
I tried it using this, but cannot make it fit the above function,
fun balancedBracket(result: String,
size: Int,
open: Int,
close: Int): Unit
{
if...