Best data structure to use with Growing Tree Algorithm | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Best data structure to use with Growing Tree Algorithm

I’m trying to determine what would be the best data structure to use with the “Growing Tree Algorithm” described here: http://weblog.jamisbuck.org/2011/1/27/maze-generation-growing-tree-algorithm The algorithm explanation describes using a dynamic list of some type, despite the algorithm name including the word “tree”. I’m leaning towards List or Linked list, but I’m not very experienced with those to know for sure. I do not know Ruby, so the sample code provided isn’t helpful to me.

20th Apr 2020, 5:46 AM
Elizabeth Kelly
Elizabeth Kelly - avatar
1 Answer
+ 1
Thank you Jay Matthews that makes sense for the recursive backtracking option. Not sure still about the Prim like option - but that’s ok. The recursive one was what I cared about.
20th Apr 2020, 3:43 PM
Elizabeth Kelly
Elizabeth Kelly - avatar