Renamed Stacks.java to SequenceUtil.java, code formatted to one-liner if possible