Something on the lines of counting sort will do. Make an array Count[26] where Count[1] will have the number of a's etc. While reading string A, keep note of the count of the characters in Count and while reading B, just check if the same number of characters occur.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
