Grokking the Coding Interview: Patterns for Coding Questions
0% completed
Problem Challenge 1: Connect All Level Order Siblings (medium)
.....
.....
.....
Like the course? Get enrolled and start learning!
A
Anonymous
· 4 years ago
I don't believe you need a previous. Just set currentNode.next to the head of the Queue. On the very last iteration/node the queue will be empty so currentNode.next = null.

Reading Progress
0%