Need help in the problem: Christmas Spruce.

Правка en3, от absy, 2021-06-15 21:23:42

913B - Новогодняя елка

119557653

Basically, I create a nested list where I store each node's child vertexes in different elements(eg: indexes of the child vertexes of the root node are in the 0th element/ the first element) of the list. Then, I remove the index of the child vertex (if that child vertex has further children) from the element associated with the parent vertex.

For eg: if 1 had 3 children, 2 3 and 4, and if 2 had further children, then we remove 2 from the element associated with the root, i.e. the 0th element in the list.

so before change -> [[2,3,4],[5,6,7]] after change -> [[3,4],[5,6,7]]

I'd appreciate the help especially since I'm a noob at coding :)

Теги #help, #newbie

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский absy 2021-06-16 11:46:39 343
en3 Английский absy 2021-06-15 21:23:42 695
en2 Английский absy 2021-06-15 21:06:16 5 Tiny change: 'blem:913B][submissio' -> 'blem:913B]\n\n[submissio'
en1 Английский absy 2021-06-15 21:05:33 421 Initial revision (published)