Take an input string with X opening brackets [ and Y closing brackets ], in a random order.
Determine if the generated string of brackets is balanced, that is it consists of pairs of opening/closing brackets in the correct order with no matched opening and closing pairs.
Do not worry about input other than brackets and empty string.