This is going to be quick post. I was asked 3 questions.
1) Find the nth last node in a linked list. Had to write the code and read it.
2) Find the intersection of two sorted arrays. Again had to write code and read it. She also asked me to write test cases and complexity for this one.
3) Design a car rental system. I think I floundered here. I answered with three classes
a) class CarRental (will have an array of Car objects)
b) class Car
c) class Customer
It was a 45 minute interview and this was my second round. I wrote about my first phone interview here . Within one hour after this interview, I got a mail for scheduling 3rd round of phone interview. Usually with this company 2 phone interviews are norm, but I guess, they could not make a decision to call me on-site. Now waiting for 3rd round.
Wednesday, August 11, 2010
Thursday, August 5, 2010
Mosque at Ground Zero
American Society for Muslim Advancement and the Cordoba Initiative are planning to build a mosque 2 blocks away from the Ground Zero. Their main aim is to promote tolerance among the Christians and Muslims. I don't think these people need to teach Americans about tolerance. It is because of their secular and liberal ideas that people of different faiths, races and color are able to thrive and make this country a prosperous one. As Thomas Friedman has pointed out in his nytimes article, if there is any place these people need to promote harmony among religions, it is not in the USA but in Saudi Arabia or in Pakistan. Can you imagine having a church in Saudi Arabia? Wiki entry on religion in KSA shows :
"Due to the legal framework of the country, which does not provide legal protection for freedom of religion, the public practice of non-Muslim religions is prohibited"
Democracies like USA, India give the right to people follow any religion and also the right to construct religious structures anywhere in the country (ofcourse within legal framework). Muslims in USA have every constitutional right to construct the Mosque at the proposed place in New York. But this is not about constitution or first amendment or legality of the mosque. Its about the sensitivities of the people who suffered in the ghastly 9/11 attacks. The attack was done in the name of Islam and having a mosque at that place would be highly insensitive. Infact having any kind of religious structure at that place would be wrong.
That New Yorkers have voted in favor of the Mosque shows the greatness of this country and the forgiveness of the Yankees. This should be a slap in the face of all those Islamic fanatics who claim that Western civilization is degraded (Iran president claims so. Have a a look at the link). Even though India is also a democracy and religions have the same rights as here in USA, I can say that Indians would have never accepted even a proposal to build a mosque in place of the destroyed Taj Mahal hotel in the Nov '08 terrorist attacks in Mumbai.
So what should be built at Ground Zero? ASMA and Cordoba initiative may try to rebuild the World Trade Center twin towers. There can be a memorial, a museum, an educational institute...
http://en.wikipedia.org/wiki/Cordoba_House
"Due to the legal framework of the country, which does not provide legal protection for freedom of religion, the public practice of non-Muslim religions is prohibited"
Democracies like USA, India give the right to people follow any religion and also the right to construct religious structures anywhere in the country (ofcourse within legal framework). Muslims in USA have every constitutional right to construct the Mosque at the proposed place in New York. But this is not about constitution or first amendment or legality of the mosque. Its about the sensitivities of the people who suffered in the ghastly 9/11 attacks. The attack was done in the name of Islam and having a mosque at that place would be highly insensitive. Infact having any kind of religious structure at that place would be wrong.
That New Yorkers have voted in favor of the Mosque shows the greatness of this country and the forgiveness of the Yankees. This should be a slap in the face of all those Islamic fanatics who claim that Western civilization is degraded (Iran president claims so. Have a a look at the link). Even though India is also a democracy and religions have the same rights as here in USA, I can say that Indians would have never accepted even a proposal to build a mosque in place of the destroyed Taj Mahal hotel in the Nov '08 terrorist attacks in Mumbai.
So what should be built at Ground Zero? ASMA and Cordoba initiative may try to rebuild the World Trade Center twin towers. There can be a memorial, a museum, an educational institute...
http://en.wikipedia.org/wiki/Cordoba_House
Labels:
Cordoba house,
Cordoba initiative,
Ground Zero,
Mosque,
New York,
Park51
Wednesday, August 4, 2010
First Round Telephone interview
I had a technical phone interview and this was the first round in it. I am not disclosing the name since, I am still in the middle of the interview process. The interviewer asked me to briefly tell about myself. Before I could say 3 or 4 lines he cut me short and asked what was my role as a student programmer at Ohio Medical Center. Since my resume had C, C++, Java and C# he asked which languages I was most comfortable with and asked me to rate myself on a scale of 1-10.
Then he asked questions on OOPs concepts. He asked quite a lot of them and since I was answering pretty quickly he went on asking them. He asked questions on design patterns and asked about Singleton, Observer, Strategy, Factory, Composite. I did not know what Composite pattern was so could not answer it. Also asked me to elaborate on differences between C++ and Java, parameter passing types, auto-boxing in java. Also asked lot of questions on Collections in Java. Hash table, hashmap, vector, arraylist. I dont remember other questions but we spoke about 15 min on Java/C#.
Then he asked about data structures, stacks, queues. hashing, linked lists. The questions on linked lists were to find the 5th node from the last. This is popular question so I am not answering it here. Other question was to find if there is a loop in the linked list. I answered using Tortoise and Hare problem and we had discussion about why the method works. Again this is popular question, so you can find it on web.
The next question was to find the repeating element in an array where only one element is repeating and all are unique. The question was modified to find the element repeating thrice where are all other elements are unique and one element is repeating twice. I used hashtable approach for both the questions.
Then came the final decider question for which we need to write the code and send. He asked me to design an multi elevator system in a building and send the code in Java by evening. Since I had lot of time, it had to be quite exhaustive. I submitted the code but afterward, I was not happy with the design. May be I should have used a different approach. I used elevatorchallenge.com as reference but I did not copy that.
The interviewer said that I did very well in the interview but I have to see if he would like the elevator system code. Waiting to hear back from them.
Then he asked questions on OOPs concepts. He asked quite a lot of them and since I was answering pretty quickly he went on asking them. He asked questions on design patterns and asked about Singleton, Observer, Strategy, Factory, Composite. I did not know what Composite pattern was so could not answer it. Also asked me to elaborate on differences between C++ and Java, parameter passing types, auto-boxing in java. Also asked lot of questions on Collections in Java. Hash table, hashmap, vector, arraylist. I dont remember other questions but we spoke about 15 min on Java/C#.
Then he asked about data structures, stacks, queues. hashing, linked lists. The questions on linked lists were to find the 5th node from the last. This is popular question so I am not answering it here. Other question was to find if there is a loop in the linked list. I answered using Tortoise and Hare problem and we had discussion about why the method works. Again this is popular question, so you can find it on web.
The next question was to find the repeating element in an array where only one element is repeating and all are unique. The question was modified to find the element repeating thrice where are all other elements are unique and one element is repeating twice. I used hashtable approach for both the questions.
Then came the final decider question for which we need to write the code and send. He asked me to design an multi elevator system in a building and send the code in Java by evening. Since I had lot of time, it had to be quite exhaustive. I submitted the code but afterward, I was not happy with the design. May be I should have used a different approach. I used elevatorchallenge.com as reference but I did not copy that.
The interviewer said that I did very well in the interview but I have to see if he would like the elevator system code. Waiting to hear back from them.
Subscribe to:
Posts (Atom)