GTZ
摘要: 递归:函数调用自己。(可终止) 格式:if(是基本情况吗) 直接求解,并返回结果 else(是另一种基本情况吗) 直接求解,并返回结果 递归情况 else 返回(进行某些处理步骤,然后是针对更小规模问题的函数递归调用) 递归与迭代:当一个问题很明显可以分解为类似或相同的更小的小问题,同时有终止条件时 阅读全文
posted @ 2020-02-08 00:01 GTZ 阅读(191) 评论(0) 推荐(0)
摘要: 链表的遍历: int ListLength(struct ListNode *head){ struct ListNode *current=head; int count=0; while(current!=NULL){ current=current ->next; } return count 阅读全文
posted @ 2020-02-08 00:00 GTZ 阅读(135) 评论(0) 推荐(0)