Group Group Group Group Group Group Group Group Group

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>) {
    val queue = ArrayListQueue<TreeNode<T>>()
    children.forEach { queue.enqueue(it) }

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

Plis fix this on the book :smiley:

Happy Coding

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

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.