Thread: From C to Java
View Single Post
Old 07-13-2004, 06:33 PM   #11 (permalink)
HighterDK
Registered User
 
Join Date: Jul 2004
Posts: 6
HighterDK is on a distinguished road
Yes, I know that find the biggest palidrome simple won't work and that's why I made a method to deal with it(optimizePal). Basically this method checks if there aren't any other palidromes around the one you have that might use parts of it. So if the palidrome was geaaeg this method would check if there aren't any palidrome that might use ge or eg as a part of it. If there are, like in ggeaaegcg, the palidrome will be resized so it doesn't end up destroing the other two (on the example above it would be resized to eaae).

And yes, it was a programming assignment.
HighterDK is offline   Reply With Quote