answer:
O(N
2
) since there are at most N
2
arcs