So, I have an object of objects, representing a binary tree with n levels. All of them have an unique ID (which can be random), and a Level and position. In other words, every object have a "left" and a "right" object, and for each level the number of objects are doubled.
The "position" parameter indicates the objects "left-to-right" position in the current level. I'd like to print the tree using "Breadth-first search", i.e. i want to iterate over level and position so that the following (only showing the "position")