思路:
将h一直往下调用,直到h=0,然后+1返回。
递归方程:
h==0 return 0;
h!=0 return CountNode(h->next)+1;
运行环境:VS2017
代码实现:
#include<stdio.h>
#include<stdlib.h>
typedef struct node
{
int date;
struct node*next;
}ElemSN;
//创建链表
ElemSN*GreatLink(int Date[], int n)
{
int i;
ElemSN*p, *t = 0, *h