MeridianLink Interview Question

prove that the method to detect loop in a linked list can work.