Tuesday, August 23, 2011

Amazon Telephonic Interviews

In my first Telephonic Interviews, following 2 questions were asked
1. You are given a huge array, which contains integer with repetition
you have to find first non-repetitive number in the array.
e.g
array is a,b,a,c,b
result is c
array is a,b,d,a,b,c
result is d


2. You are given a binary search tree in which one node is corrupted. You have to find that node.

In my 2nd Telephonic Interview, following 2 questions were asked
1. You are given a huge array of integers, in which elements are in sorted and ascending order. You have to search
an element index in the array.
Assumptions: length of array is not given. Morever you can't find the length of array using sizeof() operator.

2. you are given a binary tree. you need to write a method function which takes root of node as input and return an
array of length h, where h is the height of tree such that each array element contains head of linklist of nodes of
each level of tree
In other words, you need to create linklist of each level of Binary tree and have to store it's head pointer of each
level to array at that index and return that array.

Monday, December 27, 2010

Some Nautanki.. ;)

I made this fake notice on the Christmas and circulated it among all the Placement representatives of the University including Bawa Sir :P.  I got amazing replies from some of the PR's. :)



Name of the company: Santa Claus world Pvt. Ltd.

CG Criteria: No

Work Profile: As a fresher You have to work in the gift department, to select gifts for people of various ages. After experience of 5 years, You will be transfered to gift packing department. After 5 years of experience, you will work in the stable as Sleigh Keeper.
Here you will also be taught sleigh riding. After experience of 20 years in this department you will get a chance to promoted as Santa's Assistance. Here you'll get experience of Santa's work. When you'll reach the age of 70's, you might get a chance to become Santa Clause*.

Work Location: Anywhere in the world but not at the place where your gf/bf lives :P.

Working Hours:  Working hours are reflexive, but 10 hours a day are mandatory.

Selection Process: There are 147 openings for Thapar Computer Science Batch. It will be on the basis of first come first serve basis.

CTC: All the employees of the firm have to give 10 lakh per annum as donations. Nothing more is needed.

Santa's firm is also providing six months training.. Go and Grab it.. :)

Best Of Luck.

* You must have long white and dense Beard.. :)
Feel Free to ask any queries. :)

Solar Eclipse

The picture below is of Solar Eclipse. It was taken on 15-01-10 at 12:30pm near Distance Education office @ Thapar University, Patiala. It was a combined effort of me, Gurleen Ruprah and Gazal Singla. This picture was clicked by me, that is why it is heart shape... ;)

Sunday, December 26, 2010

How i got Juniper in my teenage.. :)

The placement season had started. The first company that visited our campus was Winshuttle, on 16th August. I was out in the second round. Next company was Make My Trip. In this also i was out in the second round. Now it was Juniper's turn. After rejection from two firms i was little disappointed (yeah not much :P ). They day was a usual day. But there is a saying if something big thing has to happen, you get sign from Universe.
So here my story starts.
Juniper was scheduled to visit our campus on 20th August at 9.00 AM. Juniper was here for recruiting freshers as interns and based upon the performance it will give permanent placement offer to them. For your information Juniper Networks is a networking company, biggest rival of CISCO. It was founded by a Indian Pradeep Sindhu in 1995. Juniper is known for making high speed routers. Juniper has their own operating system, JUNOS.
I from the beginning was interested in Networking field. Internet and Web Technologies was taught to us by Maninder Sir. He is one of the best teacher in our department. He created my interest in this field. It was 18th Aug. I got news from Placement cell that Juniper had preponed and it will visit on 19th Aug 3pm. Unlike most other students i didn't get nervous. My sitution was normal.
Unlike other companies Juniper was on time. Their PPT started around 4pm. One of the member of Juniper Panel got late. He arrived there around 5pm. The good thing about PPT was that their HR didn't any make grammatical mistake in PPT. Their selection process consisted of written test followed by interviews.
Written test started around 5.15. I am not sure, but it was 75 mins test. The level of Test was very good. It covered almost all the subjects including Data Structure, C, C++, Aptitude and Operating System. 80 students appeared for the test.
After waiting around an hour, result of written test was out at 8pm. They have shortlisted 33 students. My name was at 6th position in the list. So till now it was a usual thing for me. I give the written, get shortlisted and get rejected in the next round.
As i said earlier if something have to occur in your life, you get unusal signs from Universe.
My interview was scheduled at 9.15 pm. It was 8 pm then. I am a day scholar. So i have to go back to my place to wear my formal interview dress. It took me atleast 15 mins to reach home if there is no traffic on the roads. In the list i saw some names whose interview was scheduled on the next day. Since it was night, i realized that it would be good for me if i rescheduled my interview on the next day, because i had to find the shop which is open at that time and get the printout of my CV, then go back to home, get dressed and return to college. I was also hungry. So according to my calcutions it was going to take around more than 1.30 hours for me to reach the college. I had already wasted 15 mins thinking of such non-sense but sensible things :P. Sanchit had same situation. We both were scheduled at same time. So first I talked to Bawa Sir (our TPO) to talked to Company officials. But he said don't do this. It gives bad impression on company. Ankit's Interview was in the morning. I asked him to swap his interview with me. But he refused. Now me and Sanchit decided to talk to company official by ourselves. I went inside placement cell and told one of them my condition. Unlike what i thought he said "OK!! sure. We can take your interview now." I told them i didn't have my Resume right now and the shop inside Thapar is closed now. He agreed for both of us. I told bawa sir about this. He said you've made a mistake. You made a negative impact about yourself. This thing was pinching me. Now it was upto me to whether to come at night or in the morning. I decided to leave the final decision at my mom. I drove back to my place. It was 8.30PM. My mother motivated me to try my best to appear for the interview at night. I called Sanchit that i am appearing for the interview now. I took my pen drive and rode on my scooter to get the printout of my CV with my younger brother. The shop was around 1 KM from my home. I had never seen any traffic police on that way. It was night, so i didn't take my helmet . But as opposite to what i thought on the way traffic police stopped me. I told them about my interview. But he said "Enni raat nu kehdi interview hai oye!!" ( Who takes interview at this odd time). After negotiating with them for 7-8 mins he left me unchallaned :). I took printout. But forgot my pen drive at shop :P. Again on
the way back to my home, the policeman tried to stop me. But i didn't stop. I get back to my house. It was 8.50 now. I got call from college that co-ordinators on duty are calling my name. I got little more tensed. I put my formal dress and ate something. Finally I marched back to college. I reached college around 9.20. As i reached the placement cell, the co-ordinator was literally shouting my name. I was getting tensed and tensed. My folder and CV was in my bag. Luckily, i met Kanwar outside the cell. He helped me to settle down. In the next 45 seconds i was inside the room where two interviewers were waiting for me. Now here my interview starts. Here, I stands for Interviewer and J stands for me.
I: Tell us about yourself.
J: I am Jitesh Kumar.. bla bla bla...
I: Ok. so lets start with a problem. Tell me Newton's 3 laws of motion.
Millions of thoughts came to my mind why he is asking this question. Then i stabled my mind and started thinking about it.
J: Newton's first law: A body tends to be in its current state of rest/motion, unless or untill external force is applied on it.
Newton's second law: Force applied is directly proportional to acceleration and by this law we proved that F=ma.
Newton's third law: To every action there is equal and opposite reaction.

He drew a picture of a wheel on frictionless surface and ask me
I: What will happen if i apply force on it.
J: Since the surface is frictionless, so the wheel will not roll. It will slide by an acceleration of F/m.
Then he asked many questions from data structure. He gave me some programs to write code. I was doing well.
Now last tragedy was about to occur.
I: Write the prototype of a function pointer which return a character pointer and take void pointer as argument.
J: char * ( *fp) ( void * )
Interviewer deleted parenthesis surrounding *fp. So it now became char **fp ( void * )
I: What is this?
Now as totally unexpected, my phone rang. And the most interesting thing It was not in silent mode :P.
J: Sorry Sir. ( I rejected the call and switched off my phone)
I: It's Ok.
Now billions of thoughts were coming to my mind. Throughout my interview, Interviewer was not showing any expression he was neither happy nor sad. So was I. I got bit nervous from inside but didn't reflect it on my face. I think that was my positive point throughout my interview and in my daily life also. But still i was nervous. I looked at the question he asked.
J: I guess it's error.
I: Are you sure?
J: ( after thinking for sometime) Yes.
I: Which type of error?
J: hmm.. Syntax Error.
I: So the last question from my side is You have an array of 99 length and there are unique numbers from 1 to 100. How many numbers are missing?
J: 1
I: Write a code to find that number.
J: I did that.
I: So we are done. Do you have any question for us?
J: What kind of Job Profile you will offer us
I: We have various profile, First we will test you and based upon your performance we will assign you work accordingly.
He also told some other things about Juniper. Still last tragedy was about to occur :).
I: Ok i have one more question. Why do you want to be a coder not a tester?
J: Sir, i think according to my capabilities and my achievements i have more experience in coding. I have no experience in testing.
I: But testing require more experience. To be a tester you need to have a good experience in coding.

I didn't exactly remember what he was asking and what i was repling after that. Because it was my first HR interview i've faced and i was not prepared for that. The one sentence that i still remembered is that Interviewer said I've proved that you were wrong. To which i replied
J: I think i am not.
I: It's your wish to accept. Ok, so we are done.
J: Thank you.
I shook hand with them and came out of the room.

Coming outside the placement cell, i thought about my interview. The co-ordinator guided me to go to another room to collect the T-Shirt. Now infinite thoughts were coming to my mind. I told myself again i ruined everything. I called Lokesh and told him everything and then i realized the prototype that was asked from me in the interview and to which i replied as syntax error was not an error. I told lokesh if Juniper has to select 32 students out of 33, then also mine number would be 33rd. After listening to what i did in the interview Lokesh reaction was: " See Jitesh, your interview has gone fine. You are taking unnecessary tension. Apart from one question, i handled every question very well."
Then i got call from number who was calling me in the interview. Before picking the call, i was thinking how should i react to this call. Then i thought everything happens for a reason. It was my mistake that i didn't put my phone on silent mode. I picked the call. It was Shivangi. She wanted to confirm her name for upcoming company. I roamed in the college with Sanchit till 11.30 pm. Then i came back to home. Obviously, That night was a sleepless night.
Next day i woke up at around 9 am and i realized that my pen drive was missing. On my way to college I picked up my pen drive from the shop. In college, interviews were over by 11 am. All the shortlisted candidates sat in the placement cell for listening to the result. On my left side chair Ankit Babbar was sitting and on my right side Jitin was sitting. Jitin as usual was saying "Mera naam to hoga nahi.." and As usual I ignored him :). I was thinking I will try hard for the next one if didn't get through Juniper. Juniper Panel member told some good things and stressed on academics. As they announced the result. My name was there in the list. Juniper picked up 10 diamonds from our University and 2 were in the waiting list for whom we get to know later. I was one of them. Yeah Juniperites are diamonds because Juniper was the first company to visit our campus for recruiting interns. Ankit hugged me. I was on the top of the world. My best friends Dhananjay, Ishan, Nitish, Mangal, Manjot gifted me Coffee Mug, that i still had.. :) After that day I had never seen any traffic police person on that place again.
So thats how i cracked Juniper.The good thing was I was 19 then. It was my personal wish to get in a reputed company in my teenage. My teenage was going to end in the next month and our mid sems were also going to start in the next month. So there were no signs of any good company in the next month.
Guys!! The great moments of your life won't necessarily be the things you do. They'll also be the things that happen to you. I'm not saying you can't take action to affect the outcome of your life. You have to take action, and you will. But never forget that, on any day, you could step out the front door and your whole life can change forever. You see, the universe has a plan, and that plan is always in motion. A butterfly flaps its wings... and it starts to rain. It's a scary thought. But it's also kind of wonderful. All these little parts of the machine constantly working, making sure that you end up exactly where you're supposed to be, exactly when you're supposed to be there. The right place. at the right time.
P.S.: The last paragraph is not my creation. These lines were told by Ted Mosby in How I Met Your Mother :P

Thursday, December 23, 2010

My girl friend is in Noida.. -Adobe

Adobe visited our campus on 21st Dec for Quality Assurance Profile. I was not interested in this profile so didn't sit for Adobe. As i am placement representative of my branch, our TPO (Dr. H.S. Bawa) put me on duty. Adobe a big name, the only king in its field, having no competitor. I had given duties in so many companies, but duty experience of Adobe was amazing. As computer guys has training in the last semester, i got selected as intern in Juniper Networks, Bangalore. So I was enjoying my last duties at Placement Cell. Adobe team panel consisted of Head of QA departement (Rahul), 2 Product Managers (Ashish and Piyush) and one person from HR (Shaveta). 100 students sat for the written test. Adobe distributed T-shirts to all the students who appeared for written test.
Adobe had a written test which consisted of objective questions based on analytical, aptitude and some c questions. In the end there were 5 subjective questions of which students had to write code for 3 questions.
They shortlisted 15 students for the final interview rounds. Adobe had sectional cut off from each section.
They conducted 4 interviews rounds so their selection process continued till the next day. In the end they selected 3 students for final placement.
So Adobe work was over now. I asked them to give me their contact. I said i am interested in Adobe but in the development department. Good thing was that they knew about Juniper. Rahul's cousin was in Juniper US and many friends of Ashish are in Juniper. They said it's a good company. Work for atleast 2 years there.
Bawa Sir : Why you want to join Adobe?
Me : I want Noida as my work location.
Piyush: His girlfriend must be in Noida.
Bawa sir: Ha!! yehi baat hai.. Maina abhi pata karvaata hun..

All laughed after it. Adobe took all the selected participants on Lunch.
So this was my most amazing experience with any company.

Thanks for patience reading.. You can share your comments with me!!!