Closed yosshi4486 closed 3 years ago
Because sbtree is binary tree.
or 'makeSternBrocotTree(numberOfNodes: Int)' determines the actual level and returns least node.
and makeNodesSequenceOfSpefifiedLevel(_ level: Int)
class SternBrocotTree {
private(set) var nodes: [SBTreeNode]
init(heightOfTree: Int) { }
init(level: Int) { }
func nodes(at level: Int) -> [SBTreeNode]? { }
}
if I give '10' to a function, it returns the sequence owns 1024 proper nodes of stern brocot tree aligned left to right.