Category: Anagrams
-
How to write JUnit test code in Java for the for Anagram check function ?
This is the JUnit 5 solution to cover all kinds of inputs provided to Anagram function. This Unit test executes tests for the class ‘AnagramJ8’.
-
How to check two sentences or strings are Anagram
This is the fourth solution to check whether the given two strings are Anagram are not. This program uses lambda expression with two parameters. The internal logic uses the String’s class methods toCharArray, contentEquals and Array’s sort method
-
How to check the two strings or sentences are Anagram using HashMap
This is the third solution to check whether the given two strings are Anagram are not. This program uses Hash Map collection.
-
How to check two strings or sentences are Anagram using StringBuilder class
This is the second solution to check whether the given two strings are Anagram are not. This program uses deleteCharAt() method of StringBuilder Class.
-
How to check two sentences or strings are Anagram using String class
This is the first solution to check whether the given two strings are Anagram are not. This program uses toCharArray() method of String Class.
