public void rebalance() {
        if (tail.size() >= LOAD_FACTOR &&
                tail.size() >= 2 * head.size() ||
                head.isEmpty()) {
            while (!tail.isEmpty() ) {
                head.push(tail.pop());
            }
        }
    }