Home > Back-end >  The data structure
The data structure

Time:09-25

Static linked list, with an array of r storage nodes next domain point to the subsequent, work j to the nodes in the chain, make the operation of j moving along the chain to ()
[j]. J=r next
J=j + 1;
J=j -> next;
J=r [j] -> next

It is best to explain it in detail,

CodePudding user response:

Emmm is also a small white, I feel use an array to store static linked list is a bit wrong ah, that's not is order list...
Mobile operating should be j=j - & gt; Next; Next to the next number, this number is assigned to the j j is moved along the chain...

CodePudding user response:

Singly linked list data structure on data sort http://bbs.csdn.net/topics/392201633

CodePudding user response:

J=j -> next
Set point to the node j p, the node of the next node for the p.n ext
The next to j j - & gt; next

CodePudding user response:

Choose C, the key point is, if is the array access to the current array index

CodePudding user response:

Choose D
How come so many people talking nonsense

CodePudding user response:

Choose the last one,,,

CodePudding user response:

It's wrong to choose the last one,,,, should choose the first,

CodePudding user response:

The answer should be A, but personal feel "work j to the chain of nodes" this sentence is an alternative
To put it bluntly subject to express meaning, r [j] is the current node, not the current node pointer, so the next node is r [j]. Next

CodePudding user response:

Topic does not mean that the j is a pointer to a node, the node next domain point to the subsequent, that's j=j -> next; C
Those who say A or D, you exactly is the j as A pointer or subscript! ?
J can be lvalue (address), can also when the array index?

CodePudding user response:

This should be a singly linked list, because it didn't give you anything else, only next to the domain, so if you want to move, can only j=j - & gt; Next (note, the next should also with j type pointer)
The next field, should be in structure defined or the class definition defines a data member, because is pointing to the subsequent (that is, is at the back of the logical relationship between the nodes), so the next field type is a pointer to the data domain type j,
Upstairs some, first, I think unless the array subscript j is the intermediate node, j is pointer not subscript can eliminate A, D;
B is more impossible, if j is a pointer to an array of r is can, but can also next domain?
So, can only choose C

CodePudding user response:

Static linked list is composed of data fields and vernier, the problem of pointer should be identified elements,
If there is a static linked list as follows:
Data: A B C
Cursor: 1 3 (next domain)
The subscript: 0 1 2 3 4
If j point B, c is r [1]. Next is 3, r [3] is c, anyhow should be A

CodePudding user response:

Third, because the next is to save the address of a node, so for j this pointer, j. & gt; Next is the next node address, and then assigned to j, is equivalent to j pointed to the next node,

CodePudding user response:

C
Because j - & gt; Is to point to the next node address, here is to point to the next node, becomes a move along the chain

CodePudding user response:

reference 1st floor Effys response:
emmm is also a small white, I feel use an array to store static linked list is a bit wrong ah, that's not is order list...
Mobile operating should be j=j - & gt; Next; Next to the next number, this number is assigned to the j j is moved along the chain...

Hello, my name is ray class education in 6.6 no. 6.12, hosted the "python data analysis and machine learning cutting-edge technology" course, live can replay looked a month, ending plus an offline training course,
We sincerely invite you to attend, detailed additive WeChat come414877967

CodePudding user response:

refer to the second floor 4 teacher zhao response:
to singly linked list data structure for data sorting http://bbs.csdn.net/topics/392201633

Hello, my name is ray class education in 6.6 no. 6.12, hosted the "python data analysis and machine learning cutting-edge technology" course, live can replay looked a month, ending plus an offline training course,
We sincerely invite you to attend, detailed additive WeChat come414877967 for registration
  • Related