Qualcomm interview question

Test the acyclic linked list.