|
-
May 23rd, 2012, 07:49 AM
#1
Finding the 3 longest palindromes
Hello guys,
as a novice C# programmer (I come from MatLab and Java) I'm being asked to create an algorithm that finds, given a string, the three longest palindromes contained in it, and returns them, with their starting index and length. For example, the output for string, “sqrrqabccbatudefggfedvwhijkllkjihxymnnmzpop” should be:
Text: hijkllkjih, Index: 23, Length: 10
Text: defggfed, Index: 13, Length: 8
Text: abccba, Index: 5 Length: 6
I'm downloading #develop now, and I'll give it a go, but does anybody have any ideas/solutions? Thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|