Wednesday, December 15, 2010

Waltz with Bashir: The Movie

Waltz with Bashir (Hebrew: ואלס עם באשיר‎ - Vals Im Bashir) is a 2008 Golden Globe, NSFC and IDA award-winning, Academy Award, BAFTA and Annie award-nominated Israeli animated documentary film written and directed by Ari Folman.


In 1982, Ari Folman was a 19-year-old infantry soldier in the Israel Defense Forces. In 2006, he meets with a friend from his army service period, who tells him of the nightmares connected to his experiences from the 1982 Lebanon War. Folman is surprised to find out that he does not remember a thing from the same period. Later that night he has a vision from the night of the Sabra and Shatila massacre, the reality of which he is unable to tell. …

Friday, March 12, 2010

Interview Question: Unique string for any integer

Problem: Given any integer value, return a sequence using capital alphabets which are unique. For example, 0 changes to A, 1 changes to B, 25 changes to Z, 26 changes to BA, 676 changes to BAA, 17576 changes to BAAA. This could be useful for example if you need to generate short unique names for files.

Question: Will AAA sequence ever be returned? If yes, will ZAA sequence ever be returned? (The answer to one of the questions should be No. If "Yes", ask how will 0 be represented?)

Question: What are the maximum characters needed to support full range for 4 byte long integer, i.e. how long will be the sequence for 2^31-1=2,147,483,647? (The answer should be a small algorithm or quick calculation to evaluate this. Exact answer is 6 characters.)

Solution for numbers up to 25 (1 character). Marks: 10/100
Solution for numbers up to 675 (2 character). Marks: 25/100
Solution for numbers up to 17575 (3 character). Marks: 80/100
Solution for any number. Marks: 100/100

Solution for any number, plus valid answers to both the question. Why are you still continuing the interview? Offer him or her the position. :-)

(Mathematically, the problem is analogous to converting a number from base 10 to base 26. The solution is simpler if thought that way.)

Tuesday, January 12, 2010

Google Quick Search Box

For Mac lovers and Spotlight haters, try Google Quick Search Box for Mac only.

You can download it from the homepage or the Google Code page.

Looks like Google learnt something from QuickSilver, at last.