void pushathead(struct Node* head, int data){
struct Node* new_node = (struct Node*) malloc(sizeof(struct Node));
new_node->data = data;
new_node->next = head;
head = new_node;
}
void pushathead(struct Node** head, int data){
struct Node* new_node = (struct Node*) malloc(sizeof(struct Node));
new_node->data = data;
new_node->next = (*head);
(*head) = new_node;
}
谁能解释这两种方法之间的区别,应该使用哪一种来实现?