@@ -0,0 +1,938 @@
+package com.ttaylorr.ctci.answers.stacks;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Stack;%0A%0Apublic class SetOfStacks%3CE%3E extends Stack%3CE%3E %7B%0A    protected final int threshold;%0A    protected final List%3CStack%3CE%3E%3E stacks = new ArrayList%3C%3E();%0A%0A    public SetOfStacks(int threshold) %7B%0A        this.threshold = threshold;%0A    %7D%0A%0A    @Override%0A    public E push(E value) %7B%0A        Stack%3CE%3E last = this.getLastStack();%0A        if (last != null && last.size() %3C threshold) %7B%0A            return last.push(value);%0A        %7D else %7B%0A            last = new Stack%3C%3E();%0A            this.stacks.add(last);%0A%0A            return last.push(value);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public E pop() %7B%0A        Stack%3CE%3E last = this.getLastStack();%0A        return last == null ? null : last.pop();%0A    %7D%0A%0A    private Stack%3CE%3E getLastStack() %7B%0A        return this.stacks.isEmpty() ? null : this.stacks.get(this.stacks.size() - 1);%0A    %7D%0A%7D%0A

Add 'SetOfStacks' problem