typedef struct node{
int data;
struct node* next;
}node;
swapInList() : in this case we only have data in the node , can we swap data(in the exam)? as in the exercice on moodle lab on linked list of integers (u already asked to swap elements if possible but in the exam can we do that if we have one element? swap data instead of nodes?)
i know that this only differs if there is other elements in the struct (more than 1 which is data here) that's why i'm asking in case in the exam u asked swap function