Ask a question about the algorithm.

ask a question, for example, in the box in the picture, I randomly point to a number in the graph, then the adjacent squares of this number are also clicked, and then the adjacent squares of these adjacent squares are also clicked. Recursively (for example, when I click 1, 1.1-1.9 is lit, and then the neighbors of 1 are all lit, the neighbors of 2.1-2.4 are also lit), what data structure and algorithm are used to implement it?
Oct.15,2021
Menu