This method processes the vector of node levels to get the position of each node inside the level. E.g. c(1,1,1,2,2,3,4,4,5,5) turns into c(1,2,3,1,2,1,1,2,1,2)
acc_successions(nodes, res = NULL, prev = 0, acc = 0)
a vector with the level of each node
the accumulative results of the sub successions
the level of the previous node processed
the accumulator of the index in the current sub successions
the vector of sub successions in each level