implemented generic linked list that functions as queue or stack for any node type