Amazon

Wednesday, January 30, 2008

A probabalility question

You have N balls with N different colors. Randomly you draw two at a time,
then painting the first ball to match the second. What is the expected
number of drawings before all balls are the same color?

Tuesday, January 15, 2008

Python tips and tricks

Q: How to add current path into system?
A: sys.path.append(os.path.abspath('./'))