One thing I was asked was to write a Boolean function that takes in a string. It returns true if the string is 'balanced' meaning if there are open brackets in the string, there should be enough closed brackets to balance the string and these closed brackets should also appear after the open brackets. For example, '()()' would return true and ')()(' would return false. '(()))' would also return false while '()(())' would return true.