#include<iostream>
using namespace std;
typedef int type;
struct node{
type date;
node * link;
};
node * createList(int a [],int c){
//cout<<sizeof(a);
//cout<<sizeof(int);
//cout<<a[3];
int len=c;
//cout<<len;
node *head;
node *p=new node;
p->date=a[0];
head=p;
for(int i=1;i<len;i++){
node *p1=new node;
p1->date=a[i];
p->link=p1;
p=p1;
}
p->link=NULL;
return head;
}
node* reverse(node * head){
node *p,*p1,*p2;
p1=NULL;
p2=head;
p=p2->link;
while(p!=NULL)
{
p2->link=p1;
p1=p2;
p2=p;
p=p->link;
}
p2->link=p1;
head=p2;
return head;
}
void print(node *head){
node *p=head;
for(;p!=NULL;p=p->link){
cout<<p->date<<" ";
}
cout<<endl;
}
int main(){
int b[]={1,3,4,5};
//cout<<sizeof(b);
node *head=createList(b,4);
//node *head1=reverse(head);
print(head);
// print(head1);
}