added solution for anagrams
added the solution for linkedlist has a hasCycle