views:

49

answers:

1

Possible Duplicate:
YouTube URL algorithm?

I know one method it can be done... surprisingly, a friend I know who is quite smart doesn't know how to do it... I wonder if this may be a good interview question too.

Interested in other answers. I will post my answer later on.

Update: my answer doesn't use a hash at all...

A: 

Typically you're hiding a numeric identifier in the form of something that doesn't look numeric. One simple method is something like base-36 encoding the number. You should be able to pull that off with one or another variant of itoa() in the language of your choice.

Ian