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)
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
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?
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)
It can be considered as the head node
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
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?