Notice how like our recursive programs, the definition of a linked list also contains a base case -- in this case, the NULL pointer.
注意,与我们的递归程序非常类似,链表的定义也包括一个基线条件 ——在这里是NULL指针。
Of course, part of the power of lists comes in recursive processing of the list elements, which simply means pulling the head from the list until the list is empty, then accumulating the results.
当然,列表的强大力量部分来自于递归处理列表元素的能力,这表示可以从列表提取头部,直到列表为空,然后累积结果。
A Stats object may optionally have a list of Stats objects when querying the data in a recursive mode (such as when the Boolean parameter is set to true).
Stats对象在以递归模式查询数据时也可以选择性地包括Stats对象列表。
Since a NULL pointer terminates a list, we can also use the NULL pointer condition as a base case for many of our recursive functions on linked lists.
由于NULL指针会结束一个链表,所以我们也可以使用 NULL 指针条件作为基于链表的很多递归程序的基线条件。
Notice how like our recursive programs, the definition of a linked list also contains a base case — in this case, the NULL pointer.
注意,与我们的递归程序非常类似,链表的定义也包括一个基线条件——在这里是NULL指针。
Notice how like our recursive programs, the definition of a linked list also contains a base case — in this case, the NULL pointer.
注意,与我们的递归程序非常类似,链表的定义也包括一个基线条件——在这里是NULL指针。
应用推荐