def build_adj_and_indegrees(order, edges):
    """
    Creates an adjacency list and indegree counts from an order
    (vertex count) and edges.
    """
    adj = [[] for _ in range(order)]
    indegs = [0] * order
    
    for src, dest in edges:
        adj[src].append(dest)
        indegs[dest] += 1
    
    return adj, indegs