Given a string of arbitrary length, write a perl program that will print out the palindrome(s) of longest length in the string. Assume there are no special characters, so "!c aba c!" would be considered a palindrome; also, in "abcbb", "bcb" would be considered a palindrome. Assume the string is coming in via STDIN.
This is actually a nice clever problem. I'm sure MJD could solve this while typing one-handed during a television commercial break, but I know that I had to think for at least five or ten minutes before getting a decent solution.
However, as if to completely spit in the face of this challenge, a Perl Monastery monk known only as BUU has decided to post the question openly, without any reference to the job posting. And as a result, got a lot of clever solutions, more clever than his first attempt.
It took another clever monk to figure out what was going on. Thank goodness for the eyes of Limbic~Region.
Look, I know times may be desparate and all, but to resort to cheating... that really frosts me.
I can imagine... (Score:1)
Yet, they may wonder how they would stack up. So, they work on a solution to the problem... and, with that in hand... trot off to one of the places they hang out (regularly from the looks of it) and ask others to participate in the "competition".
I can imagine many, many reasons for not mentioning the source of the original problem. (One being the issue at the forefront
Re:I can imagine... (Score:2)
Re:I can imagine... (Score:1)
Sadly, I didn't.
And that got *me* "frosted". So, I went upstairs and got another cup of coffee.
Then, I remembered that once or twice in my life I've been wrong. (did I say "life"?
With that in mind, I would have use a sniper rifle instead of a shot gun. But I would still pull the trigger.
So, I would have simply sent an email to the company alerting them to the thread and let them decide on what to do should any of the submissions be s
Innocent bystanders (Score:2)
Re:Innocent bystanders (Score:1)
Jeff japhy Pinyan
Perl, regex, and perl hacker
Re:Innocent bystanders (Score:2)
Re:Innocent bystanders (Score:2)
I don't mind the use of handles or nicknames, but I think people should own up to who they are. I certainly put my real name with my posts.
Note why L~R knew about it (Score:1)
I don't know what exactly it adds to things, but if a cheat at all, BUU was being an incompetent cheat by first telling people in the chatterbox about the job posting, and then saying he was going to make a SoPW post
Just like the real world (Score:2)
Re:Just like the real world (Score:0)