3 ms·
Find route can probably be made way more efficient by using meet in the middle technique. Instead of finding all 6 hops from start and checking if it's the end
by kilotaras 7y ago
Find route can probably be made way more efficient by using meet in the middle technique.
Instead of finding all 6 hops from start and checking if it's the end find 3 hops from start, 3 hops from end and just intersect two sets.