publicintdeleteHead(){ if (head.isEmpty()) { while (!tail.isEmpty()) { head.push(tail.pop()); } } else { return head.pop(); } return head.isEmpty() ? -1 : head.pop(); } } /** * Your CQueue object will be instantiated and called as such: * CQueue obj = new CQueue(); * obj.appendTail(value); * int param_2 = obj.deleteHead(); */