I ask simply because these brace/bracket/parenthesis questions are more numerous than the sands of the sea....

Should we create a tag for ?

I don't think they're all that interesting (so I don't want to encourage it), but maybe having a tag for it will make people less likely to rewrite minor variations of the same challenge?


1 Answer 1


Funny you should mention it, I thought about this yesterday (not for the first time), and was planning to collect a list of challenges for the retagging today. I'm definitely in favour of this, because these challenges are fairly hard to search for, because the terminology in use may vary a lot ("parenthesis", "bracket", "brace", "matching", "matched", "balanced", "parenthesise", ... are some of the words used to describe these tasks).

However, I'd suggest the tag name to make it a bit more general. If someone makes a challenge where x and y take the role of ( and ) it's still the same even though no "brackets" are involved (and there is at least one challenge about balanced binary representations).

I'm happy to do the retagging myself over the course of several days, so that we don't bump everything to the front page at once.

As an aside, I would probably also put this tag on challenges related to balanced strings, like Catalan Numbers (I don't know if we have many others that fall into this category).

Status update

I've tried as best I can to find all the relevant challenges. I've turned up 32 of them (which, I believe, makes this my biggest new-tag project to date) and will start with the retagging tomorrow and have added the tag to all of them (see the revision history of this post for the full list). I've also set up tag synonyms with , and so that they show up in the auto-completion, and filled in the tag wiki as well as amended a few related ones (particularly and ).

  • 1
    \$\begingroup\$ I'd make "balanced string" a synonym (and maybe the primary one), but not just that exclusive. Otherwise, palindrome can be considered "balanced string" as well. \$\endgroup\$ Apr 6, 2016 at 20:43
  • \$\begingroup\$ @NotthatCharles the difference between a balanced string and a palindrome is that in a balanced string there are pairs of different characters, whereas in a palindrome the same characters are paired (unless you have something like the "convenient palindromes" challenge which I've included above). I'll definitely clarify that in the tag wikis though. \$\endgroup\$ Apr 6, 2016 at 20:45
  • \$\begingroup\$ Nice list! I'd love to help out with the retagging, is there a specific time tomorrow you're planning on having a "great retagging event"? \$\endgroup\$
    – DJMcMayhem
    Apr 6, 2016 at 20:47
  • \$\begingroup\$ @DrGreenEggsandHamDJ "I'm happy to do the retagging myself over the course of several days, so that we don't bump everything to the front page at once." ;) ... I'll do three of them at a time and then wait looking enough for them to drop at least halfway down the front page. It's fine if this takes a week or two. \$\endgroup\$ Apr 6, 2016 at 20:49
  • 3
    \$\begingroup\$ I understand the difference, but I think that just tagging something, I'd probably find bracket faster than I'd remember what "balanced string" was, and I don't know if people will know what it means right off the batt. (BTW, I think there was a challenge about palindromes-except-brackets at some point) \$\endgroup\$ Apr 6, 2016 at 20:50
  • \$\begingroup\$ Also, would properly-formed XML count in "balanced string"? \$\endgroup\$ Apr 6, 2016 at 20:51
  • \$\begingroup\$ @NotthatCharles yeah, fair enough. I don't see any harm in setting up synonyms for [brackets], [parentheses] and [braces]. (If we ever need a tag for tournament brackets we can use [tournament-brackets].) \$\endgroup\$ Apr 6, 2016 at 20:52
  • \$\begingroup\$ @MartinBüttner or dental braces :) \$\endgroup\$ Apr 6, 2016 at 20:53
  • \$\begingroup\$ Hm good question about XML. That probably goes beyond simple balancing and should use the [syntax] tag or something. Not sure though... \$\endgroup\$ Apr 6, 2016 at 20:53
  • \$\begingroup\$ Ah, it was codegolf.stackexchange.com/questions/28190/…, which is already on your list. \$\endgroup\$ Apr 6, 2016 at 20:55
  • \$\begingroup\$ I like this proposal. Thank you for taking it upon yourself to do the re-tagging. \$\endgroup\$
    – user45941
    Apr 8, 2016 at 0:01
  • \$\begingroup\$ balanced-string does not seem self-explanatory. I think the tag name should have 'parentheses' or brackets' in it. \$\endgroup\$
    – feersum
    Apr 10, 2016 at 19:49
  • \$\begingroup\$ @feersum [parentheses], [brackets] and [braces] are all set up as synonyms, so if you type one of those, the auto-suggestion will find it and the tag wiki excerpt has an explanation (and mentions parentheses). \$\endgroup\$ Apr 10, 2016 at 19:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .