How many programmers you know like video games?
2 karma · joined June 29, 2010
Depression is mainly alleviated by doing something productive almost every day. That way, your night feels good because you got something done, and so does your next morning.
void reverse_list(head) {
struct node* current = head;
struct node* last = NULL;
struct node* next;
while(current != NULL) {
next = current->next;
current->next = last;
last = current;
current = next;
}
}