Errata The book is wrong in the chapter 6

If you saw in the book is the next information

Screen Shot 2020-01-19 at 5.32.10 PM

but if you saw Queue is an interface and in the final folder of the chapter we can see this

fun forEachLevelOrder(visit: Visitor<T>) {
    visit(this)
    val queue = ArrayListQueue<TreeNode<T>>()
    children.forEach { queue.enqueue(it) }

    var node = queue.dequeue()
    while (node != null) {
      visit(node)
      node.children.forEach { queue.enqueue(it) }
      node = queue.dequeue()
    }
  }

Plis fix this on the book :smiley:

Cheers,
Happy Coding

@galata Can you please help with this when you get a chance? Thank you - much appreciated! :]

@shogunkaramazov
Yeah, I came across the same thing. It was not corrected in the latest version of the ebook. In theory, you could use any of the implementations. It does not necessarily have to be a list implementation.

A suggestion would be to have the reader pick his/her own implementation.

Came across the same error in the v2.0. There is only an interface given for Queue. Should be changed and either provided or told to create an ArrayListQueue?