Shopee Express operates transfer routes between numbered sorting hubs. Each route moves a parcel directly from one hub to another and counts as one transfer. Given the directed routes, return the minimum number of transfers needed to move a parcel from source to destination. Return -1 if the destination is unreachable.
Implement minimum_transfers(n, routes, source, destination), where n is the number of hubs labeled 0 through n - 1, and routes is a list of directed pairs [u, v] indicating a route from hub u to hub v. Return an integer representing the minimum number of routes on a valid path from source to destination.
Routes may be repeated, and the graph may contain cycles. A hub can be visited at most once during the search.
def minimum_transfers(n, routes, source, destination):