implemented dijkstra's algorithm for collection of flowers