Programming Challenge solution from different sources like top coder and so on