Thread: Could Be Simple
View Single Post
Old Nov 13th, 2004, 3:02 AM   #1
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 406
Rep Power: 5 xavier is on a distinguished road
Send a message via Yahoo to xavier
Hi, my problem is as folows: I have 2 strings : exapmple: s1="aabbccdef" and s2="abcddefd" . Now i have to find out wich letter is found more times in the 2 strings and is common to both. I turned them into char .. with toCharArray() but i'm having problems with comparing the 2. In this case the aswere should be "d".

The first thing would be to take all the commone letters and put them in ....
char c3=new char[ ? ] . I'm not sure how long it should be. from then it should be simple.
Thanks for the help i hope u'll give me .
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote