I'm just confusing myself over and over ...
I have the following table containing the information which id is connected to what other ids. And I need to find the "cheapest" connection from ID1 to ID2
local ids = {
[15] = {
[18] = {
},
[23] = {
},
[24] = {
},
},
[18] = {
[15] = {
},
[21] = {
},
[50] = {
},
[248] = {
},
[330] = {
},
[378] = {
},
[914] = {
},
[1185] = {
},
},
[21] = {
[18] = {
},
[20] = {
},
},
[248] = {
[18] = {
},
},
}
The expected result is:
local table_path = {
15,
18,
21,
}
question from:
https://stackoverflow.com/questions/66062206/get-path-of-connected-ids 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…