Question d’entretien chez Synopsys

How do you detect a loop in a linked list, how do you convert stack to queue.