Test cases are not passing

The code has successfully compiled but it is not passing any of the test case

void display(node* head) {

	node* temp = head;

	while (temp != NULL) {
		cout << temp->data << " ";
		temp = temp->next;
	}
}

u were not printing the list in the desired fashion