-6

this is the Code i have, what should i do ?

It's not even a String. it use Arraylist.

import java.util.ArrayList;
import java.util.Collections;

public class ArrayCheck {
public boolean isAnagram(ArrayList<Character> arr1, ArrayList<Character> arr2) {
   }

} 
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245

1 Answers1

0

Ok. I got the impression that you are kind of lost. Hence to get you started here how you may approach your task:

  • define a dictionary containing all words you will accept.
  • make sure the newly created string (in your case I guess arr2) is composed of the same characters as the original word (in your case I guess arr1)
  • if your validation succeeds, lookup the newly created string in your dictionary and if it exists, it is an anagram. Otherwise it is not.
Harmlezz
  • 7,972
  • 27
  • 35