/**
* Your CQueue object will be instantiated and called as such:
* var obj = new CQueue()
* obj.appendTail(value)
* var param_2 = obj.deleteHead()
*/varCQueue=function(){this.stackA =[]// 入队栈this.stackB =[]// 出队栈}/**
* @param {number} value
* @return {void}
*/
CQueue.prototype.appendTail=function(value){this.stackA.push(value)// 入队栈入队}/**
* @return {number}
*/
CQueue.prototype.deleteHead=function(){if(this.stackB.length){// 出队栈有数据returnthis.stackB.pop()}else{// 没数据的时候while(this.stackA.length){this.stackB.push(this.stackA.pop())}if(!this.stackB.length){return-1}else{returnthis.stackB.pop()}}}