第22618题 单选题
给定有向图的邻接表存储结构,求序号为k的顶点的度的算法复杂度为?

用下面的邻接表结构保存一个有向图 G ,InfoType 和 VertexType 是已定义的类型。设 G 有 n 个顶点、e 条弧,求图 G 中序号为 k 的顶点 u 的度的算法复杂度是( )。

typedef struct ArcNode{
    int adjvex;         // 该弧所指向的顶点的位置
    struct ArcNode *nextarc; // 指向下一条弧的指针
    InfoType *info;     // 该弧相关信息的指针
} ArcNode;
typedef struct VNode{
    VertexType data;    // 顶点信息
    ArcNode *firstarc;  // 指向第一条依附该顶点的弧
} VNode, AdjList[MAX_VERTEX_NUM];
typedef struct{
    AdjList vertices;
    int vexnum, arcnum;
    int kind;           // 图的种类标志
} ALGraph;
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析