Questions tagged [anagram]

A word, phrase, or name formed by rearranging the letters of another, such as cinema, formed from iceman.

470 questions
-5
votes
2 answers

what's number anagram which are palindromes in string

What is the number of anagrams which are palindromes in a string? Example : string = "aaabbbb"; Possible anagram's which are palindromes "abbabba" , "bbaaabb" and "bababab". The problem here is the time, i have string of size 10^9. here's my final…
Ahmed Mohsen
  • 73
  • 1
  • 9
-6
votes
2 answers

How to refacor a code use only loops and simple arrays?

I wrote that code and it's working. But I need to refactor it. I can use only simple methods for solving the problem, for example: "for" loops and simple array. public class Anagram { public static void main(String[] args) throws IOException { …
lutsik
  • 33
  • 8
-6
votes
1 answer

How can i to make anagram program using two character Arraylists?

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 arr1, ArrayList
-7
votes
1 answer

Anagram test by sum of characters

Can we solve anagram test puzzle by getting ascii value of each character in the string and then find sum of all characters , then calculate the same for other string and then compare two values(sum)? Is it feasible?
Neo
  • 5
  • 2
-7
votes
1 answer

All possible Angram String combinations in java

I've got to make all possible anagram string combinations with java. Checking whether two strings are anagram or not is not my problem.. But when it comes to generating the whole set of possible anagram string combinations, I can't manage to find…
1 2 3
31
32