algorithm: bracket-arrangements: adding code for bracket arrangements