[prev] 22 [next]

Exercise 2: Two points to consider

  1. Implement an edge comparison function

    cmpE(a,b) < 0 if a < b
    cmpE(a,b) > 0 if a > b
    cmpE(a,b) == 0 if a == b
    int cmpE(Edge,Edge);  
    

    which compares first on v, then on w

  2. The fixed array size is a limitation.

    Suggest two possible ways to deal with this issue.