Finding all combinations of well-formed brackets

Took a crack at it.. C# also. public void Brackets(int n) { for (int i = 1; i <= n; i++) { Brackets(“”, 0, 0, i); } } private void Brackets(string output, int open, int close, int pairs) { if((open==pairs)&&(close==pairs)) { Console.WriteLine(output); } else { if(open<pairs) Brackets(output + “(“, open+1, close, pairs); if(close<open) Brackets(output + … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)