def add_edge(s, d, curr_dict):
    """
    Adds edge between s and d in graph curr_dict
    Note: Python uses pass by reference so this 
    function will update curr_dict
    """
    try:
        curr_dict[s].append(d)
    except KeyError:
        curr_dict[s] = []
        curr_dict[s].append(d)
