Change bold code snippets to inline code blocks
This commit is contained in:
parent
f658bfbb40
commit
3c76d884ef
185 changed files with 1772 additions and 1772 deletions
8
15-02.md
8
15-02.md
|
|
@ -72,7 +72,7 @@ struct LinkNode *DeleteNodeAfter(struct LinkNode **HeadOfListPtr,
|
|||
|
||||
However, it is true that if you're going to store a variety of types of
|
||||
structures in your linked lists, you should start each node with the
|
||||
**LinkNode** field. That way, the link pointer is in the same place in
|
||||
`LinkNode` field. That way, the link pointer is in the same place in
|
||||
*every* structure, and the same linked list code can handle all of the
|
||||
structure types by casting them to the base link-node structure type.
|
||||
This is a less than elegant approach, but it works. C++ can handle data
|
||||
|
|
@ -80,7 +80,7 @@ mixing more cleanly than C, via derivation from a base link-node class.
|
|||
|
||||
Note that Listings 15.1 and 15.3 have to specify the linked-list delete
|
||||
operation as "delete the *next* node," rather than "delete this node,"
|
||||
because in order to relink it's necessary to access the **NextNode**
|
||||
because in order to relink it's necessary to access the `NextNode`
|
||||
field of the node preceding the node to be deleted, and it's impossible
|
||||
to backtrack in a singly linked list. For this reason, singly-linked
|
||||
list operations tend to work with the structure preceding the one of
|
||||
|
|
@ -112,10 +112,10 @@ Likewise, there should be a separate node for the tail of the list, so
|
|||
that every node that contains real data is guaranteed to have a node on
|
||||
either side of it. In this scheme, an empty list contains two nodes, as
|
||||
shown in Figure 15.3. Although it is not necessary, the tail node may
|
||||
point to itself as its own next node, rather than contain a **NULL**
|
||||
point to itself as its own next node, rather than contain a `NULL`
|
||||
pointer. This way, a deletion operation on an empty list will have no
|
||||
effect—quite unlike the same operation performed on a list terminated
|
||||
with a **NULL** pointer. The tail node of a list terminated like this
|
||||
with a `NULL` pointer. The tail node of a list terminated like this
|
||||
can be detected because it will be the only node for which the next-node
|
||||
pointer equals the current-node pointer.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue