search

Home  >  Q&A  >  body text

java - c语言 数据结构 顺序存储结构线性表初始化问题

天蓬老师天蓬老师2886 days ago781

reply all(4)I'll reply

  • 高洛峰

    高洛峰2017-04-18 10:47:06

    Friends, what is initialized here should be the sequence table, because there is a key attribute of the sequence table length when defining the structure, so initializing the sequence table means initializing its length to zero.
    There is no linked list here, linked lists and sequential lists are two different things
    The storage structure of linear tables is divided into sequential storage (sequential list) and linked storage (linked list)

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 10:47:06

    It can be considered as the head node

    reply
    0
  • 黄舟

    黄舟2017-04-18 10:47:06

    InitList initializes an empty "linked list" (array), len represents the number of valid nodes in the linked list. It’s a bit similar to the stack pointer

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:47:06

    The initialization linked list here is nothing more than setting Len to 0. There are only int data[MAXSIZE] and int len ​​in Sqlist L. Do you think that the value of data[MAXSIZE] must also be initialized before it is initialized?

    reply
    0
  • Cancelreply