Clarivate interview question

Write a program for anagram