「與練習題相同」
Writer: jjjjj19980806 Description: pclightyear Difficulty: ★☆☆☆☆
Given a linked list, you have to reverse it and output the result.
You have to implement four function:
1. Node* Create_List(Node*, int);
This function is used to create the linked list according to the input.
2. Node* Reverse_List(Node*);
This function is used to reverse the given linked list.
3. void Print_List(Node*);
This function is used to print out the key value in the linked list.
4. void Free_List(Node*);
This function is used to free the memory space.
The first line contains one integer n, representing the number of nodes in the linked list.
The next lines contains n integers, each integer represents a node in the linked list.
It is guaranteed that :
You need to output the reversed linked lists.
Each key value is separated by "->".