February 18

Kafka on the Shore

No matter how many books you read, each new one has its own set of possibilities and expectations. And somehow it takes a lot of time for me now to select a book to read next.
So there was this book called Kafka on the Shore by Haruki Murakami. A random stumble in a way while looking around for a good read. The japanese connection could be one of the reason i wanted to read this. And so it was that i finally bought this book. But somehow as if by destiny, i never got a chance or the desire to start with it for a month. It was as if i was waiting for a perfect moment to start this book.
And so it was on the airport, while waiting for my flight, that i started this mysterious story. It left a lot to wonder initially and even at the end there is a lot of things to ponder upon. Yet not even for a moment did it make me feel a sense of incompleteness.
All the other emotions i could feel, including Happiness, Joy, Ecstasy, Desire, Pain, Sorrow, Anguish to name a few. The rest, as with emotions, are too tough to describe. I loved the story of how a boy struggles not just in physical life, but also the mental turmoil that accompanies each moment. It was a book about thoughts as much as about events.
I loved Miss Saeki because she symbolized perfection in a way I have never read about. The 15 year old and the 50 year old characters merged into one in a weirdly enthralling way.
I loved that cabin, all isolated and far away, being portrayed as a stepping stone into mental development. It was like a test that made you come out stronger than before mentally.
I loved the character of Sakura somehow. It seemed familiar somehow, as if it was someone i have met or would meet in this life or next.
I dont think i can rate it or compare it with other books but even if i do it would be among the top 5 books i have ever read.

No matter how many books you read, each new one has its own set of possibilities and expectations. And somehow it takes a lot of time for me now to select a book to read next.

So there was this book called Kafka on the Shore by Haruki Murakami. A random stumble in a way while looking around for a good read. The Japanese connection could be one of the reason i wanted to read this. And so it was that i finally bought this book. But somehow as if by destiny, i never got a chance or the desire to start with it for a month. It was as if i was waiting for a perfect moment to start this book.

Continue reading

February 1

Amazon Interview Experiences

I have been asked the Amazon story too often, so here goes. ( I have added the interview questions at the end ).
It started with one lazy friday evening. I was busy with work ( including 3 chat windows over Facebook and Gmail ). I got a call from some consultancy services asking whether iwould be interested in a job. Not with Amazon, but some unheard of company. Obviously i wasnt interested, but then asked the person to drop me a mail. I decided to forward it to friends who might be interested. 30 minutes had passed and no mails in my inbox. I got bored, so opened up spam. There among the top 10 mails was one by Amazon. But this was for a opening in Chennai team, and i was simply not interested. I junked it and was about to go to inbox.
Something in me prompted to search spam for other job related mails maybe. I searched career in my spam, and got another mail from Amazon in the results. I opened it, and the first word that i could comprehend was Pricing. It caught my attention, and i read through the mail. It was for an opening in the pricing team based in USA, and expanding to Bangalore. Seemed like an heavenly match for me. But i felt that as it was in spam, it was probably fake. But i went ahead and replied.
20 minutes later i got a call from the HR and she asked me to come attend the written on Sunday. Are you kidding me? I never thought i would get through in 2 days prepration ( if i did some ). But i said a yes, and thought should i go or not? Whats the point wasting Sunday morning going some place 20KM’s away for a job that i wont get. I took the risk and went ahead. The written was basically about solving 3 problems. Not solving but rather coding the solutions of the 3 questions. They appeared easy, but were tough when i finished coding the solution. After that it was waiting time.
An hour later i was informed that i would be going in for the first round of interview. The interviewer ( a young guy not too older than me ) came in, and had a friendly discussion which involved asking me about some of my college projects and the usual algorithms based questions. It went rather well, much better than i had expected. I kept waiting for the next interview, until it was around 1.
Suddenly a lady came, and introduced herself as one of the people from pricing team. She has come down here, possibly to start the team. And then she took me for lunch ( i wasnt expecting that ), and then the interview. The interview was just a bit shaky but prolonged. I didnt really was able to code the solution, but did manage to work out one for the first problem. The second question went better, and i did write the code.
The wait was shorter for the third interview. I was expecting it to be the last one. The HR came to me and asked whether i am comfortable with Computer Fundamentals. I was like computer fundamentals, whats that? I guessed it to be OS, networks etc. I wasnt to brushed up, so she said that you can give it a shot and if you dont do well we can give you time and go through the interview again. I was like “Wow Amazon! Tussi great go ( You are great )!”. I went in for the interview, and did really really well in the interview. I managed to easily exceed the interviewer’s expectations for Computer Fundamentals, and mine too. The algorithm based question i tried out a new approach which didnt work out, so i went to the usual method after half hour of trying to hit the ball without a bat. I gave him the solution he wanted and that was it.
Now again i waited for like 10 minutes, after which the HR came. I was tensed, hoping this was it. All she said was, you have cleared these rounds and now there would be 2 more rounds. In my mind i thought WTF! But well thats ok, i am still in the game. She had the usual HR chat with me, and when i explained my reasons to quit, she asked me not to mention the money related things to the next 2 interviewer’s. There were 2 more rounds, one with the Hiring Manager in US ( videoconfrencing ) and the other was a bar-raiser round. Both were scheduled on Tuesday morning beginning at 8am.
So i went back, tired and exhausted mentally. The next day i did a bit of googling on the company and bar-raiser round. What i could gather was that this round was meant to raise the average talent quality of company continiously. So you need to be better than an average employee to get through. Also it seemed that this interviewer had the veto power. All yes and his/her no means a NO! It did scare me because i was still not sure i could do better than an average employee.
Tuesday morning came, and i reached the destination. The videoconfrencing started with the usual questions about how, why etc. Then came some really tough HR based questions, which rattled my mind. But i managed to give suitable answers. Then came the technical questions. Again a question and after a bit of stressing out i managed to get a decent solution. This was the only round in which i felt “Its over”. But i still had the last round. I was expecting it to be a videoconfrence too.
Turned out to be a face to face interview with a very senior person in Amazon Bangalore. It went really well, and all his technical and reasoning questions were interesting. I managed to do well, and waited for a result. Again they said it would take us 2 days to get the feedback and take a call. These were 2 tortorous days, and when finally Thursday morning the phone rang i was really anxious. “Pranay, we were just in a meeting discussing you. And we have decided to make a hiring call. Congratulations!” I literally fell down!!
That was the story! And a true one. And pretty soon, i would be a part of this company. They exceeded my expectations in terms of the compensation and take it from me, its the best compensation a IT company gives in India. Microsoft, Adobe fall behind somewhat! So my life changed. In short my salary increased considerably in my first six months of work!
Q1: Given a sorted array which has been rotated unknown number of times, find a number k. For example: 23579 after random rotations becomes 57923. Find 3 for example in less than O(n) time.
Q2: Given 2 binary search trees, find whether they contain the same set of numbers. This was an extension of what is inorder traversal.
Q3: Given a string of characters ( not just number or ASCII ), find the first unrepeated character.
Q4: Implement a function to find the min of a stack . At first i was allowed to change the push/pop function. Even after that i was asked to implement all 3 functions ( push/pop/extract_min ) in O(1) time. I couldnt do it!
Q5: Given a lined list representation of a string, find if its a palindrome in O(n).
Computer Fundamentals: File Handlers, PCB, priority scheduling, thread management, semaphores and locks.

I have been asked the Amazon story a bit, so here goes. ( I have added the interview questions at the end ).

It started with one lazy Friday evening. I was busy with work ( including 3 chat windows over Facebook and Gmail ). I got a call from some consultancy services asking whether I would be interested in a job. Not with Amazon, but some unheard of company. Obviously i wasn’t interested, but then asked the person to drop me a mail. I decided to forward it to friends who might be interested. 30 minutes had passed and no mails in my inbox. I got bored, so opened up spam. There among the top 10 mails was one by Amazon. But this was for a opening in Chennai team, and i was simply not interested. I junked it and was about to go to inbox.

Something in me prompted to search spam for other job related mails maybe. I searched career in my spam, and got another mail from Amazon in the results. I opened it, and the first word that i could comprehend was Pricing. It caught my attention, and i read through the mail. It was for an opening in the pricing team based in USA, and expanding to Bangalore. Seemed like an heavenly match for me. But i felt that as it was in spam, it was probably fake. But i went ahead and replied.

Continue reading