some code snippets analyzing/implementing queue/stack adt via linkedlist