Once I was asked (as a challenge) to write an algorithm that finds numbers that, rotated 180 degrees, look exactly the same (strobogrammatic numbers). For some reason, that 'challenge' came up during a conversation I recently had with a co-worker, so I took some time to come up with a solution (in Java):
/**
* by: Rei Colina
* A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down)
*
* To compile run: javac Strobogrammatic.java
* To run the test use: java Strobogrammatic
*/