prims algorithm maze