I am currently writing a program in which you input a word and the program then outputs all of the different ways the characters can be moved round into anagrams. I have wrote a way of turning the command line argument into a char array using the toCharArray() now I need to write a boolean array to see if the character has been used before. Any help?
djbuclkle
0
Newbie Poster
Recommended Answers
Jump to PostIf you know how to work with a char array then a boolean array is just the same except that all the values are true or false. Where exactly are you stuck?
Jump to PostWhat are you using as the index of the array? I'd use the character's integer value - but what do you do if you have a repeated character?
All 6 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
djbuclkle
0
Newbie Poster
jon.kiparsky
326
Posting Virtuoso
djbuclkle
0
Newbie Poster
jon.kiparsky
326
Posting Virtuoso
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.