Q) How would you write code to reverse a linked list
Anonymous
This was a bit tricky. I explained to the interviewer my visualisation of the linked list and worked my way through the process. Something like: curr = head; while(curr!=NULL){ next=curr->next; curr->next=prev; curr=next } finally, i think i missed assigning the head value as prev at the end.
Check out your Company Bowl for anonymous work chats.