How to find node in n-ary tree

class Node {
var value: Int

// Each node could store path from head to that node. Its index position in childern array. This needs to be calculated though.
var pathToNodeIndexes: [Int]
var children: [Node]
}

func findNode(value: Int) -> Node? {

}

Comments (0)