+ 1
Reduce my time complexity
I have an arena 1Mx1M There are units on it and a base I have to know the shortest path from a unit to the base I using BFS algorithm and it work well but if the base is on (100 000, 100 000) It takes about 15 mins to set the road How can i fix that ??
1 ответ
+ 3
try using dijsktras.. and also u can try a* algorithm by inserting the nearest units to a unit within a limited range while going from unit to base.