added check linkList have loop or not using two pointer