mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 16:26:47 +08:00
style: remove listIn
and listOut
(#1669)
This commit is contained in:
@ -29,24 +29,6 @@ class Queue {
|
|||||||
return top
|
return top
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// display elements of the inputstack
|
|
||||||
listIn(output = (value) => console.log(value)) {
|
|
||||||
let i = 0
|
|
||||||
while (i < this.inputStack.length) {
|
|
||||||
output(this.inputStack[i])
|
|
||||||
i++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// display element of the outputstack
|
|
||||||
listOut(output = (value) => console.log(value)) {
|
|
||||||
let i = 0
|
|
||||||
while (i < this.outputStack.length) {
|
|
||||||
output(this.outputStack[i])
|
|
||||||
i++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Queue }
|
export { Queue }
|
||||||
|
Reference in New Issue
Block a user