Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Challenge: Nearest Palindromic Number

by herveus (Prior)
on Feb 02, 2005 at 20:08 UTC ( [id://427409]=note: print w/replies, xml ) Need Help??


in reply to Re: Challenge: Nearest Palindromic Number
in thread Challenge: Nearest Palindromic Number

Howdy!

The problem is to find which of the two nearest palindromic numbers is closest. If missing one of the pair when both are equally distant is acceptable (as in the problem as laid out here), then slinging strings is both fast and elegant, given that palindromicity is a string property, not a numeric property.

The solution Roy_Johnson got into print before I could (and which is a refinement of halley's, attacks the given problem about as elegantly as you can.

yours,
Michael
  • Comment on Re^2: Challenge: Nearest Palindromic Number

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://427409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-24 15:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found