[Community puzzle] Brackets, Enhanced Edition

This topic is about the puzzle Brackets, Enhanced Edition.

Feel free to send your feedback or ask some help here!

Got all the tests right but failing last validator using c#.
Any ideas?

Nope, works for me on C#. It must be similar to the test #9 (Very complex unsalvageable).
It’s a really long string (like 9997 bytes), that gives a false.
I think this challenge is easier than the original one, you just need to think about it.

“easier than the original one” ???

67% solve but :
“Failure Process has timed out. This may mean that your solution is not optimized enough to handle some cases.”

are there hidden constraints?

Have alphabetic characters a role here?

edit : 100% done ^^

Yes, it was easier.
On original puzzle n consecutive brackets of the same type will have 2^n different alternatives, whereas in that puzzle it can be reduced to just 1 option.
I.e: with 4 brackets of type () you had 16 options: ((((, ((() … ())),)))), and know it can be simplified to just ()()

I see you completed it, so you don’t have any hint.

Solved it.
The last validator is different from the last test in regard to my solution but I just optimized it and it works fine.

any hints for me?

Definitely easier than the other version :slight_smile:
But funny though !

Maybe I miss something, but what is the difference between puzzles:
Brackets Enhanced Ed and
Brackets Extended Ed ?
Exactly same code solves both for me and puzzle description is also the same only test cases differ.


This for me as well. Solved Extended, took that exact code (including imports and readLines) and plugged it in -> 100% submission. Not sure what the difference is then.

One can humblebrag about having solved them in the wrong order. Or acknowledge the fact 136 codingamers do find one of them harder.

Most likely is, you grossly overengineered one of them.

Both claim to be a harder version of community puzzle “Brackets, extreme edition”.
Only diff:
Extended Edition: N ≤ 50, number of bracketing elements ≤ 25
Enhanced Edition: N ≤ 100, number of bracketing elements ≤ 500
So maybe we were supposed to solve Extended with a limited size stack, and only then the Enhanced with a general stack?

It doesn’t matter, 2*50 XP is fine in my book for the same 25 or so lines of code :wink:

PS: There are some other very similar puzzle-pairs: Sliding puzzle & 11-puzzle, Sudoku Solver & Mini Sudoku Solver.

1 Like

This is incorrect.

…or the both of them :innocent:

You are right.
So Extreme < Extended < Enhanced.
Now I get it at last.
Gut besser Gösser

1 Like