In the Skype interview he told me to write code on google doc, he had shared same to my mail.
1)print n'th node from the last of a linked list and it should be O(n).
Respostas da entrevista
Sigiloso
19 de mai. de 2015
S a s s s s a s
3
Sigiloso
7 de dez. de 2014
Use two pointers, say ptr1 and Ptr2. initially they will be pointing to same location (Head Node).move ptr2 to n nodes and check its next location is null. if it is null print the ptr1. if not move ptr1 to ptr2. repeat the same logic. some corner case we need to handle ..