Monday, July 15, 2013

Aricent Interview Experience of Isha Aggarwal

Written : 
This time, Aricent had an online test instead of written test.
It comprised of 4 sections.

Section 1 :

Questions based on English and verbal ability were there.
Comprehension based questions were there.
Some other questions included : improve the italicized part of the sentence, or to select the synonym or antonym of the given word, to arrange the given sentences in an order, and so on..

Section 2:
This section was to judge your Quantitative aptitude. Questions on Logarithms,profit and loss, speed distance time, work, calculating cost of fencing, etc. type questions were there. Just revise your concepts and main formulas, and that would be enough.
During your mock tests, try making a note of formulas simultaneously.. It wont burden you in the end!

Section 3:
It was a mix of DS concepts and programming concepts. It was a simple section. Just be thorough with basic concepts. In some questions Pseudo codes were given, and output was asked. A few questions on C++ were also there. Only basic concepts.

Section 4:
It was the logical ability section.
Questions were simple in this section as well. Complete the series type, Given a para of information, and then answer the questions. Blood relations, a string encoded as another word, so what will be the code for another word. Notation of operators changed, and then answering the questions that follow. Data sufficiency questions were there.


People who cleared the written were asked to fill the
 Critical incidence form which consisted of questions like:
  • State a situation when you had too many tasks at one time and how did you handle it.
  • State a situation when you yourself was busy but still helped someone out.
  • When you were in a very difficult situation and you came out of it.
  • what was the most difficult decision you ever had to make.
  • Write an incidence when you stated an unpopular opinion.
  • State a task you completed of which you had very little/no knowledge.
For every question, you have to write what was the situation, how you handled it and what was the outcome!
This form will be discussed in detail during HR. So don't cook up stories.Try to think of real incidents..
Include 
We were then called for GD in a group of 10 or 12, and it was a non-eliminatory round.



INTERVIEW :

I was first asked about the programming language I am comfortable in and about some programs that I have done.
Then he asked me to write a factorial program optimally, I wrote both the recursive and iterative approach, and told him about the pros and cons of each.
Next he asked me to write a program to swap 2 numbers optimally. For this I wrote the program without using any temporary variable. I then told him about XOR method as well. He then asked me what is XOR operation and asked me to do swapping using XOR with an example.

Then he asked me to explain Quicksort with an example. He basically wanted complete dry run. Then he asked me the running time of quicksort. When I answered about worst case running time, he asked me to give a worst case input for QS.
Then he asked me differences between Insertion sort and Bubble sort, again with an example of each.

Next, he asked me to explain how to implement stack using Linked list.Where push and pop will be done, etc.
And then implementation of queue with linked list. etc.

Then he moved to OS :
Asked me what is a process, characteristics of a process. Structure of PCB. Difference between a thread and a process.What is a semaphore.Why is it used. Types of semaphore etc.

I guess that was all. He then discussed the critical incidence form in detail, so no seperate HR for me!

All the very best to all :)

Friday, June 14, 2013

Adobe Interview of Samarth Gupta

Written:
It consisted of 3 sections viz Apti and Quant, C and Engineering.
C paper consisted of 10 questions that were based on pointers and functions.
Check if an expression has valid parenthesis

Engineering Paper:
  1. Each instruction on JVM is in byte code. How many such instructions are possible?
  2. Some Memory and Process Scheduling based scenario was given along with 4 options.
  3. Synchronization of two processes using the following code:
     boolean lock;  
     while(lock) ;  
     lock = true;  
     /* critical section code */  
     lock = false;  
    
    Is it feasible?
  4. Reverse a Singly linked list
  5. Check if a number is palindrome without converting it to string
  6. Implement multiplication recursively
  7. A number has 3 on it's unit place if one of it's multiples has 1 on all it's places. e.g. 111 is a multiple of 3, 111111 is a multiple of 13. You need to find such multiple of a given number. The multiple may be very large and exceed the limits. Don't use any complex data structures.
  8. A matrix having 0s and 1s is there. Each row can not have a 1 followed by a 0. You need to find the row having maximum 1's.

Interview 1:
It started off with compilers. Explain Parsing, different types of parsing, LR(1), LALR(1). 
Steps of compilation, explain lexical analysis, linker, loader.
Examples of syntax error, semantic error, linker error, relocatable addressing.

OS:
Process management, memory management, process v/s thread, file descriptor, synchronization techniques etc.

C/C++:
Some questions for output, overloading v/s overriding, structures v/s classes, inheritance, virtual functions, can constructors and destructors be virtual? why or why not? diamond inheritance problem, and a lots of questions on pointers. Some statements were there and I had to read them properly i.e. 
 int *p;  
 P is a pointer to integer  
Complex ones were there.
In C, functions are evaluated right to left. Why, any benefit?

Data Structures and algorithms:
Convert an expression from infix to postfix and vice versa (code)
Merge two sorted linked lists removing duplicates.
Reverse a Linked List (any other method than the one I had written in the engineering paper)
Height of a tree (he asked me more than one method. I was able to give 3 solutions)
2 sorted lists, you have to find the element of rank k in their merger without actually merging them

Assembly code to generate factorial of a number (I assumed some basic instructions like ADD, SUB, JMP etc)


Interview 2:
Design a base 64 encoder for an infinite stream of data.
Implement cin and cout using printf and scanf
Implement LRU Cache
Design a class to give following 3 functions in O(1):
  • void insert(int data)
  • void delete(int data)
  • int getRandom()

Serialization and de-serialization of a binary tree.
What are smart pointers?
How garbage collection works in java?
Malloc and Free
Maps (Hash maps) and how they work?
Average of 4 unsigned integers (simple addition might result in overflow)


Interview 3:
It was with the director of the acrobat team. Started off with my intro, what I do in leisure time, and it continued for next 20 minutes on Online Gaming. Next 20 minutes were on my project in snapdeal and next 20 mins were on what Acrobat Team does and how acrobat helps adobe earn profit.
Then he moved to DS and Algo:
Reverse a Doubly Linked List (proper code)
You are given an infinite sequence of words. what you need to do is when a new word is there, store it. whenever a word is repeated, throw an exception. Make sure you do not spend too much time in searching. Give a solution using some DS and design an algo for the same. Then this moved to phrases, then he asked me to store the sequence as well.
That's it..

Interview 4 (HR Round):
This was a casual round where we discussed about adobe, job profile, facilities etc. 

Hope it helps!
All the best.. :)

Wednesday, February 13, 2013

Microsoft Interview of Monika Bisla

Written Test (Nov, 2012):
30 MCQs based on Algorithms & logical aptitude and 2 coding problems.

Telephonic Interview (7th January, 2013):
All questions related to your resume & projects and some behavioral questions.

Interviews (27th January, 2013):

Round 1:
  1. Write code for run-length encoding of a given string in-place (without using any extra memory).
    Sample Input: aaaaaaaaaabcccccc Output: a10bc6
  2. Write code for a function which converts a given integer to a string. (Use only one for-loop).Check for all the boundary cases.
  3. Suppose you are going to organize a party from 9:00 am to 20:00 pm. You have invited 'n' number of guests for the party. You are given the arrival time and the departure time of all guests. Every time a new guest arrives, you give him a glass of wine and when he leaves, you take the glass back. If someone has left and returned the glass, you can give the same glass to a new guest who has just arrived.
    Based on the given schedule for guests, determine the minimum number of glasses required for the party. A guest can come or leave at any time, but you are given the fixed schedule. Write code for the given problem.
Round 2:
Some questions related to resume and subjects studied in the curriculum.
  1. How can we do a Tree Traversal without using a stack (not even the stack for recursion). Write code for an in-order traversal without using stack. What would be the changes in the function if we want to do a pre-order or post-order traversal?
  2. Write code for finding loop in the singly linked list and fixing it.
  3. Given a linked list with two pointers, one is next pointer and another is a random pointer which can point to any node in the list (forward, backward or itself), you have to make a copy of this list without tempering the original list. Write the code for the same in O(n) time complexity.
Round 3:
  1. Give different possible approaches for Checking whether two strings are anagrams (with and without using hash tables). What are the possible advantages and drawbacks of each approach? Write code for the approach which involves first sorting the two strings and then matching character by character (O(n lg n) approach). Which sorting you will use and why? Write test cases also.
  2. Write code for counting the number of inversions in an array in the minimum time possible. What could be different possible approaches?
  3. Given two huge numbers represented as linked list, write a function to add them and return a number in the same format.
    Ex: 950 represented as 9->5->0->NULL
    150 represented as 1->5->0->NULL
    then, the output should be 1->1->0->0->NULL
  4. We have ‘n’ people in a party, out of whom only one can be a celebrity. And he may or may not be present in the party. A celebrity is known to everyone but he does not know anyone. All other person may or may not know each other. If a person ‘A’ knows ‘B’, it does not implies that ‘B’ also knows ‘A’. You can ask only one question to someone ‘Do you know this (‘X’) person?’ and he can only reply in YES or NO. Your job is to find the celebrity in minimum number of questions.
Round 4:
First he asked general questions from resume.
  1. Write code for finding the least common ancestor of two given nodes in a binary tree. ( both recursive and iterative approach).
  2. Which data-structure you will use for implementing the ‘malloc’ and ‘free’ functions? (You have been given with a pointer which points to a large chunk of memory).Write full codes for implementing these two functions.
Each face-to-face round duration was approximately 1 hour. Results were declared after 4 days of interviews. Every interview was an eliminating round. Questions were not very hard but they were very keen on accuracy and efficiency of code (it should run on all possible input cases).

Friday, December 28, 2012

Amazon Interview of Vaibhav Shukla

Round 1 : Written (Online @ Interview Streets)
Apti , C/OS mcqs(Test your C Skills level) and 2 codes
  1. Given a tree, return its mirror image.
  2. Given a tree and an integer SUM , return true if there is a root-to-leaf path such that sum of all the node values result to given SUM.


Round 2 : Written 4 coding questions
  1. You have a singly linked list where apart from 'next' pointer , each node has a random pointer which can point to anything (either any node or may be NULL).
    Create a clone of this list and return its head. Figure could be helpful.
  2. Given an array of the form {a1,a2,a3.....an,b1,b2,b3......bn,c1,c2,c3........cn}
    Write a funtion to rearrange the array in the form {a1,b1,c1,a2,b2,c2,a3,b3,c3..........an,bn,cn}
  3. Given a binary tree in which each node has an extra "next" pointer . Populate this next pointer of each node with its InOrderSuccessor

    InorderSuccesor of a node is the next node appearing while travering the tree InOrder.

    struct node {
        int data;
        struct node *left;
        struct node *right;
        struct node *next;
    };
  4. Given a Binary tree , a start node and an integer K, Find/Print all nodes @ distance K from the start node
    function prototype - void findNodesAtK(struct node *root, struct node *start,int K);

Round 3 : Telephonic Interview
He told me that he'll be asking coding questions and puzzles only.His focus was on optimization.
  1. 25 horses , 5 can race at one time. Minimum number of races to find three fastest horses.Though its a well known puzzle,he wanted me to code this :P
  2. Given a binary matrix where each row has 1s followed by 0.There can also be a row with no 1s(or all zeros) . Return a row with maximum number of zeros.
    Gave two three approach, he wanted me to give optimal solution.From n^2 to nlogn to n .
  3. Given a integer array , return maximum product subarray. You just have to return maximum sum.

Round 4 : Face to Face Interview
Again focus was on Coding and Problem Solving Skills
  1. There is a town having civilians and a Mayor . You have been given an API bool xKnowsy(x,y) which will return true IFF x knows y.
    Now you have to find the Mayor based on following constraints
         a. Mayor doesn't know any civilian.
         b. Every civilian knows the Mayor.
         c. and between civilian,they may or may not know each other.
    Write a code to find the mayor using the given API.
  2. Implement Google's auto-completion feature i.e as you keep on typing characters,you see the sentences or words appearing below.
    Then he modified the problem and said , You have a dictionary having words, every time I type a character,return me the list of top 5 words appearing as in google's search bar.
    For example : if dictionary has words: if,in,info,int,integer,it. Then on typing i , words suggestion would be if,in,it
    then if the next character entered is n i.e now "in" , so possible suggestions are in,info,int,integer
    Again he modified the problem to search the word entered using the same struture that i used for above problem.
  3. Few questions on my resume-extra curricular activities. (He was Rajan sir's class mate from RLA :P)

Round 5 : Face to face interview

Mixed questions
  1. Performing Big Int Addition using linked lists
       1->2->3
    + 2->1->2
    -------------
       3->3->5
    -------------

    The resultant addition linked list has to be returned. He asked me about different test cases that i would be handling.
        a. Linked lists can be of different length.
        b. On adding last to digits, if the carry is there, then one extra node would be there in the resultant
     linked list. and rest basic test cases(NULL check etc).
    Then he modified the problem and asked to solve it recursively. The addition should be done recursively.
  2. Given a linked list and an integer K . Reverse the nodes in groups of K.
  3. Vaibhav is connected to A,B,C,D on facebook. A is connected to P, P to R and may be other. like wise B->E->F->C. This type of structure was given in which a person may be connected to other, in such a way that there could be more than one path between any two given people.
    Now, given two people. Find the shortest path between the two.
    Note : Don't use Dijkstra's.Actually you can (he wanted something else :P)
  4. How TCP verifies that packets are reachng the destination in sequence?
  5. Explain the process of page load when you hit www.amazon.com in url bar,in brief.
  6. Diff between threads and process. Why are threads called light weight ? What is a system call ? Difference between system call and interrupt.
  7. You are moving in an infinite string of words.At any point in time,you'll be asked to stop. Then on whichever word you are, return all the anagrams of that word present in the infinite string.
  8. Probability : Given two jars and 50 blue ball and 50 red balls. Distribute the balls in two jars in such a way so as the probability of picking up a red ball is always maximum.

After a month :
Round 6 : Face to Face interview (Algo/DS)

  1. A number i is given in its binary form, Find the next greater number than i having equal number of Set bits.
    Example : If i = 011001 , then next greater number with equal number of 1s will be 011010.
    Hint : Try more examples and figure out a pattern.
  2. Given an integer Array and a number K , find a Pair (just one) in the array whose sum equals to given K.
    Two three approaches were discussed and he wanted to optimize the solution as much as possible.
    Last constraint was : Without sorting the array, do it in O(n) time.
  3. You are given an array of Strings, return TRUE if and only if All the strings can be connected in one chain.
    Condition for connectivity is , if the last character of one string matches first character of second string, the two string can be connected.

    Example : String []arr ={"abc", "cde", "cad" , "def" , "eac"} will return TRUE coz all strings can be connected in one chain
    "abc"->"cde"->"eac"->"cad"->"def"

    Another Example : String []arr ={"acb" , "cde", "def", "ead" } returns False coz "cde"->"ead"->"def" is the possible chain but "acb" is left out.

    Note : Its not necessary to start with the first String and form the chain, It may happen that you won't get a chain if you start with first string but you can get a chain if you Start with any other String. If there exists a possible chain, then your solution should return True.

    In the second example , if the first String was suppose "fcb" , then a possible chain would have exists "cde"->"ead"->"def"->"fcb" so True.

Monday, October 22, 2012

National Instruments Interview of Monika Bisla

Written:


  • sqrt(b^2 - 4ac), if a =[0, 0.5] and b=[4, infinity), Whats the range of c?
  • Write a recursive function to get the product of all the digits of a number.(eg: for 123: output 1*2*3; for 56: output 5*6=30)
  • Find the 100th number of the series 2, 4, 8, 14, 22, 32....
  • Find the 20,000th element of the series 1, 2,2, 3,3,3, 4,4,4,4, ....
  • Write a single statement to check whether a given number is a power of 2.
  • T(n) = 2*T(n-1)+2^(n-1); T(1) = 1. Find T(7).

  •  int index, i=0, k=0, j=0;  
     for(index=0; index <= some_number; index++){  
       i = i+1;  
       if( (i/5) == 1 ){  
         i=0;  
         k = k+1;  
         if( (k/5) == 1){  
           k=0;  
           j = j+1;  
         }  
       }  
     }  
    

    What's the value of i, k, j interms of 'some_number' after the the execution of for loop?
  • A bag contains 3 coins out of which * 1 coin is painted RED both the sides * 1 coin is painted BLUE both the sides* 1 coin is painted RED with one side and BLUE with another. Two coins are selected from the bag and tossed. Find the probability of  getting both as RED.
  • What's the effect of(or write a common code) the following code on an array of 8 elements?
     for(i=0; i<4; i++)  
       a[i] += a[i+4];  
     for(i=0; i<4; i++)  
       a[i] += a[i+2];  
     for(i=0; i<4; i++)  
       a[i] += a[i+1];  
    
  • Write a function for generating random number between a given range.
    Using above, write a function to generate random integers between a given range such that probability of each integer is same.
  • How many edges are there in a complete graph of n vertices.
    Using the formula in question above, find number of graphs possible with ‘n’ vertices (graphs need not to be complete).
  • Calculate number of inversions in a given array.
    In general what would be the number of inversions in the worst case and what is that worst case.
  • Let us define a walk from v to v in the given graph:

    Number of 1-walk is represented by W(1) and given by:
            V-V                               // W(1) = 1
    Number of 2-walk is represented by W(2) and given by:
            V-V-V
            V-W-V                           //W(2) = 2
    Find W(3) and W(4).
    Also find W(n) in general.
  • Draw a DFA for a language which ends with 0101.
Interview 1:
In this interview, they basically discussed written test only and some extra questions:
  • Write code for making a copy of Binary Tree.
  • Write code for finding maximum root to leaf path sum.
    Write code for both approaches (top-down and bottom-up).
Interview 2:
  • Given a long formula for a carbon compound, Write a code for counting the number of carbon atoms.
    Ex: (C2H6(CH2)6CH2C3H4)4CH2C6H6C5H5
    Handle all the cases.
    Give code for iterative as well as recursive approach.
  • Given a Binary tree, where internal nodes of the tree represents an AND or an OR gate and leaf nodes consists of values either 0 or 1.
    Write code for finding the final resultant at the root node.
  • In the Question given above, add one more argument to your function which gives the expected value of the result.
    If result calculated by your function and expected values are not same, flip the gates in internal nodes of tree in such a manner such that result and expected values comes out to be equal.
    Do this in minimum number of flips possible.
    Also handle those cases where it is impossible to achieve the expected value.
    Write the code for above problem.
Then, there were some normal HR questions and that was it!! 

Friday, August 10, 2012

Thoughtworks Interview of Monika Bisla

1st round:
11 logical assessment question based on some flow charts.

2nd round:
Coding round.

Interview 1:
  • Tell us about yourself.
  • What all subjects in Computer science u like ??
  • Then they asked: Are u comfortable with OOPs? I said, yes.
    He asked "Have u seen movie avatar"? I said, No. He said..does not matter..
    Suppose there is a rocket , it contains a Spaceship.I want to send some people on Mars.People are there in the spaceship.Write a program to lend the spaceship on Mars planet. Make all the classes.
    Then, they said, Suppose tomorrow i change my requirements, i want to send 'N' number of things top Mars , Or i may also send rocket empty,just for testing. Incorporate all these things in your classes n show us the main program, How all these classes are related, how will u make the spaceship lend on Mars.
    It took around 20 mins in this question only.
  • Do u know about recursion. Write a program to print a given character 100 times.
  • 2 more coding problems:
    1. Write a program to find 1st and 2nd maximum from an array.
      I wrote it...I used swapping in the program at one place. Then they said..do it without swapping.
    2. Given Input :: x1y2z3 Output :: xxyyzzz
      I wrote the program Then they said, suppose input could be anything like
      Input:: abc3defgh1aa3 Output:: abcabcabcdefghaaaaaa
      Change your program accordingly.
  • Are u comfortable with DBMS ? What is normalization.
  • Do u use Twitter..?? I said, No, I use facebook. They asked, u make post on ur wall.Simulate a database for this.What all table will u make.??
    I made only 4 tables (since they were specifically asking about posts)
    • User's Table :: user_id , user_name , Place , d.o.b , rel_status
    • Friend's Table:: user_id , friend_id
    • Post Table:: Post_id , User_id , Likes , Post_text
    • Comments Table:: Post_id, Comment_text , Friend's Id(who made the comment)

    Then they gave me an SQL query:
    Write a query to retrieve all the comments made by USER 'X' on all of his friend's posts.
    I wrote the query using three nested sub-query.
    They asked, Is there any other way of doing this?
    I told it can be done using Views but I don't know how to do that.
  • Then, they asked , Have u heard about the sudoku game? Make a class for that and how will u solve the game , given some random values? What all data structure will u use? Give us the proper implementation.
  • Would u take a 9*9 grid or how will u do that ?
    I said i will make a class of 3*3 grid. N i will make 9 objects of that class.
    How will u do that?
     class sub_mat {  
       int a[3][3];  
       public:  
         . . .  
     }   
     int main() {  
       sub_mat sudoku[3][3];  
     }  
    

    Then , they asked me to do the initialization. I made a function for that. - Then , they asked me how would u solve it now? I told them my approach. - they asked me to show the syntax of that function n how would i call it? What all things will be used?
    I made a static function in the class, in which i passed the whole grid.. Then i calculated all the possible values for each cell.
Interview 2:
  • They again started with OOPS concepts.
    They asked," u must have travelled in DTC bus ". Write a class and its member functions.
    I made a class for vehicle..added data members (like model_no , price , serial_number , Type of vehicle , name..etc) then i added some functions like (start(),stop()...etc.)
    I made a class Bus, I made vehicle class public to it. I added data members and functions for bus class. They wanted to add more and more functions. 
  • Then, they said suppose there are three type of seats (Women, Senior citizen and conductor), how will u implement this thing in your class?
    I implemented it using a 3*3 array in which i stored type_id for a particular seat and then a range for that particular type.
  • Then, they said, Suppose we do not have any range , we can give any seat randomly to anyone, how will u implement it now, and there can be 'n' number of types of seat. -I made a hash table kind of thing. Then they said there is lot of pointer kind of things in this bus class. Make a separate class for this data-structure for seats. 
  • Then they said, "you have also done Java, Is there any data-structure available in java for this ?" Implement that also.
  • They asked.., shouldn't you categorize your vehicle class more,on the basis of type of vehicles. what all classes should be there and what all member functions should be in each class. (they spent half an hour on this question only.)
  • You have done compiler , So tell us what is a linker and what is a parser? How do they work? Who call them when a program gets executed and to whom they return their values?
  • Make a parser for a language in which i have data-types like :: tni a; taolf b;
  • Tell us about various scheduling algorithms.
    • How would u implement Remaining Time First ?? (I did it using min-heaps)
  • What is preemption?
  • What is Process Control Block? How does it gets implemented in memory?
  • U have done K-means algorithm , Let me ask u a puzzle.
    Suppose u have a Car , U have infinite amount of fuel , U have to go to some city "XYZ". U have never heard the name of the city, U dont know anything about it. U dont know in which direction it is and u cant get any information from any source. What strategy u will make to go to that city?
    I asked, Sir , can u tell me the distance. He said, no, It can be anywhere..it can be thousands miles away in any direction.
    My answer : I will first go straight from wherever i am , then i put a mark there, and take a circular round to ensure that place is not located in that radius.then , i again travel straight and take a circular round and so on until I find the place..
    then he asked, Is it a BFS or DFS ?? I said, first we go straight (i.e. DFS) and then we take a round (i.e. BFS) , so it is a mixture of both BFS and DFS.
    He said, Suppose now i am ready to tell u one hint, What will you ask for and what will be ur strategy? I said, tell me the distance.
    He said, it is 10,000 miles away.
    I answered, I will go straight 10,000 miles and take a circular round..:)
And that was it.
(Important part was that they wanted implementation of all things and you had to do everything on board.)

Friday, August 3, 2012

Google Written On Campus

Google visited our campus for the first time. The procedure consists of the following rounds:
  • Written test
  • Sets of Interviews
The Written Test
The written test consisted of 2 sections: 
  1. MCQs: There were 20 questions consisting of questions from OS, Algo, general logic etc. They covered all the things from basics of each subject to advanced concepts like NP Hard Problems etc.
  2. Coding Section: Coding section consisted of 2 programming problems:
    1. Problem 1: Two friends Atul and Vinay went for a picnic on an island. The island is a grid of m x n. While going back to home, Atul went and Vinay was left on the island. Now upon realizing this mistake, Atul is coming back to the island. In the meanwhile, Vinay will be wandering on the island. His probability of taking a step in any of the 4 direction (up, down, left, right) is equal. This means that he may fall into the sea as well and drown. Given the no of steps (k) he'll be taking before Atul arrives, size of the island (m x n) and his initial position (x,y), find the total probability that he'll be alive after Atul arrives.

      int ProbabilityOfBeingAlive(x,y,m,n,k)

    2. Problem 2: Write a code to multiply two integers.

      int Multiply(a,b)
Candidates shortlisted were called for the interviews in B'lore later.

Tuesday, July 17, 2012

Nagarro Interview Experience of Amit Kumar

Written Test: 2 papers
Paper 1: Aptitude (mathematical section) and analytical reasoning (only Problem solving type puzzles)

This paper includes two sections
  1. Mathematical section problems on mensuration, geometry, trigonometry, profit-loss, percentage, problems on train, boat-stream etc.
  2. Analytical reasoning (only Problem solving type puzzles).
The level of Mathematical section is more than average as compared to other companies
And also the level of Analytical reasoning questions is good.

Paper 2: Coding round
3 problems are given to be coded in 75 minutes (I attempted all 3).

  1. Given an array of integers which contains positive and negative numbers you have to arrange the negative number first then positive numbers in O (n) time.
  2. Given an array of integers and a number “k”, you have to find the all such elements whose sum is equal to “k”.
    This is a subset sum problem.
    Ex:- {1,2,3,4,5,6,7,8,9} k=10
    O/P:- {1,2,3,4}, { 1,3,6}, { 1,2,7}, {1,4,5}, {1,9}, {2,8}, {3,7}, { 4,6}, {2,3,5}.
  3. Given an integer array of positive numbers, you have to find all pairs of “next nearest consecutive numbers” in array, if not present then nothing to print, if present then print all such pairs.
    Ex: - Input1:- {1, 4, 2, 5, 7, 8} O/P is {7, 8}
    Input2:- {1,4,2,5,7,8,9,10} O/P is {7,8}{8,9}{9,10}
    Input3:- {1, 6, 9, 11} No output.
Those who cleared the written test were called for the technical interviews.
TIP: - Try to attempt all codes.

Interviews

It started with discussion of the codes one by one.
For codes which were not optimal, he asked me for other optimal approaches.

For Question 1:-
I had used extra memory to store the result, sir pointed out that I could have done the same thing using O(1) (constant) space and I did with constant space(with different approach).
He was trying to entangle me by the question “You haven't handled the case of ZERO (0)” then I said that ZERO is neither positive nor negative.


For Question 2:-
My code would not have printed all outputs if the input size would increase, so he asked me to think different approaches. I told him an approach that use all (2^n) subsets of the give array of size n, that takes sum of the elements of the subset and then check with the given sum. If they equal print all elements of that and I repeat this process to all (2^n) subset of array.

He said that same approach is written by your friend, than I said that it may happen, then he asked me again to think different approach. I said that I don't have any alternative solution.

For Question 3:-
My code prints the all such pairs that differ by one, so sir asked me to correct the code then I said that I can find the minimum difference of two indexes and also the difference of the element at these indexes equal to one.
Again, he was trying to entangle me by the question “You want to make array of difference of indexes”, then I said that no I will use only two variables.

After this, he asked me to write a code to print the following pattern
12345
23451
34512
45123
51234

That's all for the technical interview.

HR Interview
  • About yourself
  • Marks, JAM Rank, how many candidates appeared for JAM that year.
  • Interests
  • About Nagarro - Where do you see yourself in 5 years, how many seniors you know in Nagarro, is this your first interview, technology you'd like to work upon, how will you manage transportation to Gurgaon etc. 
That's it. :)

Saturday, July 7, 2012

Aricent Interview of Monika Bisla


Written exam was same for all. For details regarding written, click here.

Interview
My interview started with my resume. The interviewer had a look at my resume and asked about my recent projects. I told him briefly.

Then he started with C questions like

  • What will happen in this code :
main()
{
        main();
}
I replied with Segmentation Fault. Then he asked what is a segmentation fault? In which conditions segmentation fault can occur?
  • Which loops are used in C language? Difference between while and do-while?
  • Types of storage classes in C? Difference between auto, static, extern and global variables. What is their scope and where do they get stored in memory.
  • How can we write structures in a text file and then retrieve it?
  • Fopen and Fclose commands in C,  how they are implemented?
  • OOPS concepts, What is polymorphism and types of polymorphism? What is function Overloading?
  • Can we use sizeof() operator in #define preprocessors? If not, why?


After this he switched to Software Engg.

  • SDLC(S/w develoopement life-cycle.)
  • Various models? Why watrefall model is called waterfall? What is an Agile model?
  • When we do requirement analysis, which is the most basic step?
  • What is RISK? How do we do risk management? (he also asked, “Is joining Aricent a Risk”? :))
  • What are various kind of testings? Unit Testing , Integration Testing, Regression Testing?
  • When do we do all these testings during developement of software?


Switching to Operating Systems,

  • How do we implement Cache?
  • What is purging?
  • What is a page fault? How do we handle it?
  • What is a deadlock? Give an example.

After this, he asked about difference between Stack and queues and their applications? Which data structure do we use for recursion? Why stack is used for recursion?

Starting with Computer Networks,

  • What is the difference between TCP and UDP? where are they used?
  • Layers of ISO model, protocols used in application layer and transport layer.
  • What is the difference between packet switching and circuit Switching? TCP and UDP use what?
  • What is difference between http and https?
  • Port number of FTP, HTTP?
  • What is difference between a switch and a router? In which layer they are implemented? What are L2 and L3 switches?
  • What is a VPN? Is it implemented using internet?
  • What is VLAN?
  • How do we implement a WAN?
  • What is GSM? How it is implemented? Is it used for voice or data or both?
  • What is GPRS? how it is implemented? Can we send voice packets on GPRS?
That's it. 
Overall, he covered all the topics.

Friday, July 6, 2012

Aricent Interview of Samarth Gupta


This year, students had a slight relaxation in the eligibility criterion; students with 59% were allowed to appear.

Round 1: Written
Duration: 1 hr 40 mts
No negative marking

Subround 1: Aptitude
30 questions, 30 minutes
Syllogism, data sufficiency etc. Easy questions.

Subround 2: Attention to the detail
20 questions, 20 minutes
How good are you at looking into the details.
·         3 words were given. Either all can be same, 2 of them can be same or all different. Mark options accordingly.
·         General Mathematical questions where operators (+,-,*,/) were replaced with each other
·         Picture matching
Easy questions.

Subround 3: Algo and DS
20 questions, 20 minutes
Questions based on Algo and DS. Easy ones, you just need to know basic algorithms and data structures, their pros and cons, running time of algorithms and operations on data structures.

Subround 4: Programming Concepts – Choice in between C, C++ and Java
30 questions, 40 minutes
You’ll be given a choice and you have to choose 1 in between C, C++ and Java.
Questions will be based upon your choice of language. I chose C. Easy ones. The mock placement tests helped a lot. Some questions were even repeated.


Critical Incident Form
This was to check how much capable a candidate is to work in a team environment, his leadership skills and how well he handles situations with resource constrains. Refer to Rajan Sir’s interview experience to get the details of questions.

Make sure that you write only the reality. You can be asked what you’ve written and if you cook some stories, you’ll be stuck up there.


Round 2: GD
9 students in each group. This was just to check the communication skills of the aspirant. If you were unable to come up with a view point, you were given a chance by the HR in the end to conclude the discussion.
We were asked to choose topic on our own. People in my group chose “Reservation for B.Sc. (H) Computer Science students in MCA”


Round 3: Personal Interviews

My interview started with Tell me something about yourself. As the interview was expected to be technical, I answered him accordingly. Then he moved to Critical Incident Form and asked me what I had written in 2 out of 7 questions. I told him, but missed a small detail in one of them. He asked me whether I missed something. Luckily I was able to recall.

Then he moved to Technical. Started with flip-flops, race condition, registers and counters. Then moved to C. Total number of data types and keywords in C.

Then he moved to networks. On which layer of OSI, does data translation take place? What is the difference between Telnet and SSH? Explain how a file is fetched from a unix server to a windows machine.
I told him that I am not much comfortable in Networks. Then he asked my fav subject. I replied C. He said that he doesn’t like C and asked any other fav subject. I replied DS and Algo. He told me that he’ll ask from networks only and continued with last question. Then he modified the previous question of file fetching that I had to fetch all the files having keyword ‘data’ in them. He wanted me to write a shell command, but I was able to explain the logic only and told him that I don’t remember syntax of sed and awk.

Next he moved to Software Engg. Types of testing, what all kinds of testing I’ve heard of, categorize them under black box and white box, explain each of them, SDLC, explain SDLC, name models, explain models. I told him that I don’t remember testing properly. Then he gave me a problem for average of 3 numbers and result was not allowed to be 0. I was asked to design test cases and he expected me to write them down in a proper manner.

All through, he tried to test my confidence by saying that I was telling wrong answers, he has studied something else and I am telling something else etc. etc.


I had marked development role on my form out of a choice between development and testing role. He asked me why development and why not testing. I was asked to convince him to put me in development and tried to convince me for testing side by side. I gave him reasons and he always replied he was not convinced. This conversation continued for about 20 minutes and in the end he said that he was still not convinced and asked me that since I was unable to convince him, should he mark 0 in communication skills column of the interview report. I replied politely that he can mark me on my performance. With this, ended my technical interview.


Soon I was called for HR interview. She started with “Tell me something about yourself”, then hobbies, interests, my fav interest. Since I answered music, she asked me what kind of music. I replied with my fav genre,  then she asked me artists. After this she asked me how did I manage daily up-down to home. She asked my why aricent, my dream company. I replied with Google. Then she asked why aricent then, why not Google directly. I replied that Aricent works in networking and I'll be able to improve my technical skills so that I can match the Google level. Next was my expectations from Aricent. Then I was asked if I wanted to ask some questions from Aricent. I asked a lot of questions regarding technology, current projects, work environment and cab.

That’s it. My interview lasted about 1.5 hrs including 15 minutes of HR interview.

Wednesday, July 21, 2010

Nagarro Interview of Prashant Singh

Nagarro @Department


Written: 2 Papers

Paper 1 - Aptitude
This included problems from trigonometry, mensuration, geometry, percentages, profit-loss etc.
The level was above average as compared to other companies.

Paper 2 - Coding
 4 problems to be coded in 90 mins: (I attempted all 4)

1) Given an integer array containing only 0s and 1s, find the longest sub-sequence in which number of ones equals number of zeroes.
2) Given an integer array of size 3*n, containing 3 subarrays - A(a1...an), B (b1...bn) & C (c1...cn) in that order. Write code to change the order to a1,b1,c1,a2,b2,c2...an,bn,cn. You cannot use extra memory.
3) Given a string, find the first non-repeating character. (Eg: abcabd - answer would be c)
4) Print the following pattern, do not store elements in the memory:

                      55555
                      44445
                      33345
                      22345
                      12345

Those who cleared the aptitude test were called for the interviews.

Tech Interview

- I was asked to introduce myself, and I'd mentioned my interest in embedded and mobile systems, so sir asked me which microcontrollers I was familiar with. He then asked me to implement MUL instruction for an 8085 mcu.
- Which is my favourite language and why? I answered C, and gave my reasons : fast, closer to the machine, flexibility, etc. It was his favourite language too!
 
Sir then shifted to the codes I had written, discussed each code one by one. For codes which were not optimal, he asked me for other approaches.
For Question 1: I had used 2 variables to store count of 0s and 1s, sir pointed out that I could have done the same thing using only one variable!
For Question 2: My code did not run for all input sizes, so sir asked me to think of different approaches. I told him a recursive one, and he told me an iterative one. It was the same as my code with a different indexing formula.
For Question 4: I was again asked to think of different approaches, and sir said that best one would be to use the difference between rows and columns.
Then sir asked me about which languages I like? I told him C. He asked me, why C? and what all do you like about it?
Then sir asked me a few questions from C, (dynamically malloc'ing a 2d array, and difference between that and (m*n*sizeof(int)) )

 HR Interview:

- Ma'am asked for my introduction, and asked the usual questions -
- Who all are in your family, interests, where do you live, how would you rate yourself in coding in your class? 
- What technologies would you prefer : .net, java, c/cpp, etc... 
- Why Nagarro? What do you know about Nagarro? I'd looked at the profile the day before, so it helped.
- Finally she asked me if I had any questions, I just asked about the nature of work and that was it.
- Finally got selected, and I would suggest that please attempt atleast 3 out of 4 codes, if not all. 
- My interviewer paid a lot of attention to the code I had written, So be prepared with different approaches,
and know your code inside out!
  
All the best!

Friday, July 16, 2010

Aricent Interview of Rajan Gupta

This year students with any ER were not supposed to sit.

Round 1 (Written Test)
Total duration – 1 hour and 40 minutes
Total sections – 4
Marking Scheme – No negative marking


Section one – 30 minutes, 30 Questions 
Syllogism, data sufficiency questions, deductive reasoning.(Very easy section. Basic Logical questions)
 
Section two – 20 minutes, 20 questions.
There were questions which required concentration and labour work rather than brain work. 
Analytical Reasoning Questions(Coding-Decoding, Series, Picture Matching, Blood Relations etc...).  In all, again a very easy section.

Section three – 20 minutes, 20 questions
Algorithms and data structures. The section was easy. To crack this section, you need to know the basics of all types of searching, sorting and data structures like link list, stack , queue and trees. Two searching were not the usual ones – spread sort and cocktail sort whose running time was being asked.
Concentrate on running time for all three cases for this section. Cormen chapter reading would get you through this section.


There are many links given on the net as well to prepare for this section. Here are they
http://technical-interview.com/DataStructures.aspx
http://technical-interview.com/Algorithms_Questions_1.aspx
http://data-structure-definition.blogspot.com/2009/09/data-structure-defination-part-1.html
http://kundansingh.com/interview/
http://www.careerride.com/Data-Structure-Interview-Questions.aspx
http://www.geekinterview.com/Interview-Questions/Programming/Alogirthms/page4
http://placementsindia.blogspot.com/2008/03/some-basic-questions-on-sorting-and.html
 
Section four – 30 questions, 30 minutes
Programming language Section. Choice between C, C++ or Java. 


Maximum students opted for C. Paper on C was tougher than the previous three sections. You should be thorough with the concepts of POINTERS and Strings. Go through Test your C and Pointers in C by Kanetkar. Most of the questions were based on the logic of questions and how the code is working. So you should be able to trace any given code. Check the exact no of times a loop is running. See the syntax carefully so as to eliminate a compile time error. The section will take time if you have not prepared well for C as you will have to think many times before opting the correct answer.

Most of the people cleared the written and it was time to fill the critical incident form.

CRITICAL INCIDENT FORM
It checks out the ability of a candidate to work in team, his leadership skills and ability to handle any situation with the given resources. The following questions were being asked to us –
1.) Describe a situation during your college days when you were involved in some group work & you had to do something to help meet the group objective/goals.

2.) Tell me something about a recent incident where you were involved in a task & you kept making efforts to learn whatever was needed to improve the performance and to achieve the desired results.

3.) Tell me about a recent situation when you faced a problem and you had to identify the issue & related information, analyze them and solve the problem.

4.) Describe a time when you were faced with a task about which you had no or very little info /knowledge, but were responsible to accomplish it.

5.) Describe a situation when you had to make others understand & comprehend some idea or a plan to which he/she didn’t have prior knowledge.

6.) Describe a situation when you faced opposing views to your some original plan of actions or when you were doing a task, some conditions changed forcing you to accommodate.

7.) Describe a situation when you had many tasks/projects due at the same time. What steps did you take to get them all done.



They want to know what steps you took to combat the situation and how you managed to get out of it. What was the final result. Make sure you give real life events and don’t try to make stories.


Examples: Sankalan, Graduation college fest, projects in department and various other events.
Note: It would be a good idea to prepare for this form a night before the Aricent day.

Round 2(GD)
8-10 students in each group. They were divided into 2 subgroups randomly. Scripts were given to all the members on the same topic. The only thing checked here is communication skills. Even if you don’t come up with any view point, you will be asked by the HR in the end to summarize the GD.
Topic given to us was – "Should Euthanasia(Mercykilling) be legalized?" & We had to speak in favor of it.

Round3(Personal interview)
My Interview experience was good. The interviewer was super cool person.

He straight away started with my resume and asked me about MATLAB which I had mentioned in languages known. I told him that I made my security projects in matlab due to many inbuilt functions on matrices.

Then he asked me about my projects. Since aricent is a networking based company, so to his delight, he found the trap in my resume – FTP implementation. He asked me what is it. I explained him the concept of File transfer
protocol and told him that its based on Berkley Socket Interface. So he asked me what it was and how it worked. Both client side and server side were discussed in detail. He asked me all the calls – Socket(), connect(), bind(), listen(), accept(). He told me about the data structures used in this project. How to connect two systems and about ports and ip addresses. He then asked me differences between TFTP and FTP. He again asked about the commands implemented in FTP and their logic. How packets are being transferred for a file.



Then he came to my Shell implementation. How it was done. I told him about internal commands like ls, change directory, etc and external commands like pipes, input output redirection and background processes. We had a discussion over their working. He wanted me to write code for LS command. I was shocked to hear this. It took almost 4 days to implement Ls command during project, and wanted me to write that within 3-4 minutes. I refused him politely saying that I don’t remember the exact flow of but I can tell you the concept. Then he asked me to write the pseudocode for Ls but again I was not sure. I asked him again to explain him verbally. So I did that only.

Then he asked me about fork() command. How can a process be created without using fork. What is exec(). How is it implemented. I was able to handle this part. He then asked, when a system starts in unix, what all steps takes place. I explained him the concept of Bootstrap loader program and the INIT process. He then asked me more details on it n wanted me too explain about a process X creating another process Y without using fork. What would happen and how it would happen?


He then asked me what is a pointer? What is the difference between a single pointer and a pointer to a pointer. I explained him diagrammatically showing the addresses and values. Then he asked me application of pointer to a pointer. I explained him about call by value funda of C and gave him example to pass a pointer to a pointer to head node of a list while performing any operation on a link list. He was not satisfies this answer. So explained him about an array holding pointers to strings. So to access those strings, pointer to pointer was required. He was happy as I explained him diagrammatically. He then asked me about a Queue. He asked me to write functions to perform addition and deletion in a queue through array. I started writing the code and in the meanwhile he was going through my critical incident form and resume.
Then I thought he would end this interview. But he asked me explain my code. And then discussed. How can it be changed. I was nervous while a writing a code for enqueue and dequeue.



Then he discussed about my research papers. I explained him about images. How they are stored. About pixel values. And then explained him about the algorithm that I had implemented on the images. Since mine was for lightweight devices, so we discussed on the usage of memory and speed. The discussion was long on research papers.



Then he said technical part is over. He told me after talking to me and going through my resume and critical incident form, its evident that I have always been associated with so many extra curricular activities and group management task. So he need to ask anything from my Critical incident form. But still he said what would you like to be, a team member or a team leader. I said its situation dependent. Then he said, explain a situation when you had to accommodate with the plan of others in your group. I explained him an incident from my graduation life. He was happy to hear that. It was the end and said do you want to anything. I asked him I hope it was fyn from my side. He said yeah. And said that your concepts and algo is good but coding requires more practice.


That’s it. My interview got over in 1.5 hours. (2.30pm – 4pm)

Note: It wasn’t a conventional interview with standard algo ds c/c++ os dbms networks questions being asked explicitly, But through projects in my resume he checked my concepts in all.

Saturday, May 8, 2010

One97 Interview of Yayati Rajpal

Experience @ One97

We visited company and when we reach there we got to know that D.C.E was also there, So there were total of 36 students.

Written Test 1:

Out of 20 questions we had to attempt any 15 (subjective test)
Few of which I remember are as follows:

Q. Given a M x N matrix we have a robot which can move 1 step right or 1 step down, At any places there can be wall at A[i][j] where 0 is < i < M and o < j < M, starting from A[0][0]. We have to print all paths to reach A[M][N]
Q. Write a subroutine to print Fibonacci series recursively?
Q.  Write a program to reverse singly linked list?
Q. Difference between aggregation and composition.
Q. Difference between Process and Threads. What are different ways to do multithreading(something like this).
Q. Write a program to do binary search on sorted array.
Q. Given some code….tell whether it compiles or not, with reason.
Q.Given a regular expression write preorder, postorder equivalent to that.
Q.Difference between truncate and delete?
Q. 3-4 objective type questions
    Train question …………. Which conclusion follows???
In java, which command is used for garbage collection
1. system.out.gc()
2. system.gc()
3. setgarbagecollection()  something like these

Written 2 : Aptitude test
It includes questions on verbal ability, logical reasoning, numerical ability (more calculative) , data Interpretation, Good one but calculative.

Technical Round 1:
He started with
1. Tell me something about yourself? What more u want to add? What u hav learned new in last 5-6 months….?
I told him about my VisTree project (Generic decision tree inducer and visualizer) which we have implemented in java………..then he went into java……..
2. How are Interfaces different from Abstract classes?
3. Is interface there in C/C++?
4.Given a program in java called as a.java which is :
C:\abc\pqr\xyz\a.java where abc, pqr, xyz are the packages

How to compile this program on command prompt give different ways?? Few more question in java.

Then he moved to OOPs concepts: Encapsulation, Polymorphism, Inheritance
- Difference between abstraction and encapsulation??
- Write binary search program recursively.
Then he switch to DBMS,
- Normalization, outer joins, inner join, left outer join.
- Given two relations perform outer join on this (He wanted to know whether I knw it correctly or not.
- He looked into my written test paper and ask to explain reverse linked list code which I had written.
Then he switch to O.S.
Virtual memory, Page fault etc.


Technical Round 2:

He started with  how was your first tech?

- Rate urself in C/C++?? Then asked me 2-3 output questions of pointers…
- From O.S-----Paging
- What is segmentation fault ?? give situations where it occurs??
- IPC Semaphores----- counting semaphore hw it works…
- From Netwrks------TCP,UDP ?
- Sockets? I told them very basic which I knw about.
- Hav u done any socket programimg earlier??
- How connections established?
- Difference between 16 bit O.S and 32 bit O.S?

Immediately after this round I was called for 3rd tech round

Technical Round 3:

He started with how was the day??
- Then ask me to write your own atoi function??
- How to find in single line code whether 5th bit is set or not??
- 2-3 questions on C/C++ concepts……..(dnt remember)
Then little bit of HR
- Are u willing to work late hrs….
I told them if required and if work is very crucial for company, then he smiles and said every work is crucial..
- Why do you think person has to work late hrs????
- What r ur areas of interest??
- About my future plans


HR Round:

She was very nice... She first looked into my resume ask questions like
- About my favourite subjects in BSc and MSc.?
- Interests
- Future plans….What you aim to be??
- She ask me whether I knew how much package they were offering?? I told her
- Then she went out to confirm with her colleagues
In the end she smiled and said you are part of One97……. Welcome to One97

Finally I got selected 
All the Bbest... :)

One97 Interview of Shefali Sharma

Two written tests:

1. Engineering Test: Questions from Data structures (you have to write algorithms or codes), theoretical questions on DBMS, OS, networks and C/C++ (questions on concepts)
2. Aptitude Test: Basic Quant, Logic and Reasoning, Basic English, Data Interpretation

Interviews:
Basic concepts of C/C++, OS, Networks. They may ask JAVA also.
The difficulty level of technical interview will increase from one round to another. There can be 2 to 3 Technical rounds and one HR interview. 

I faced 1 technical round (roughly 50 min) followed by 1HR round

Technical Interview:
1. May I have your CV?, ( I did not have an extra copy of my CV so i handed over my file which had my CV, certificates and marksheets of B.Sc and M.Sc)
2. Why percentage drop in 12th class?  kahan masti zyada kari hai B.Sc. or M.Sc.?
3. What is the admission process in M.Sc? Did u face any interview during admission in M.Sc.? What is the syllabus of the entrance test? What subjects have you studied in Msc?  What is your favorite subject? (I answered DS and OS)
4. What is the running time of binary search? What is the base of logarithm in the running time u mentioned, why is it 2 ? Discussed a variation - what if we divide it into 10 partitions instead of 2? How will the running time change? (per bucket/partition compare with the maximum element in that bucket/partition to decide which partition to explore next)  Can you think of any algorithm which uses the search approach you mentioned?
5. What are preemptive kernels? 
6. What are system calls? What happens during a system call? 
7. What is an interrupt? What is the difference between interrupt and system call?
8. What is the difference between Real-time OS and general OS? (this was followed by a little discussion on linux versus windows)
9. What platform have you worked on since past 5 years? What all programming languages you know?
10. What algorithm will you use to search a word in dictionary? Suggest a DS to store words in a dictionary? (This was followed by a discussion on how elements are searched from # tables and B+ trees (just a mention of B+ as advancement to # tables)) 
11. Have you heard of Trie DS? (My answer was No sir, he said think a little..., i asked him is it acronym for some DS, he replied NO.  i said i will explore it after interview. )
12. Write a 1 line code to print 3rd bit of a integer? cout << ( ( num & ( 1<< 2) ) >> 2 );
13. What are segments? (in OS) 
14. Why is TCP protocol called connection-oriented? Discuss what happens while connection establishment? (Followed by little on discussion on socket number matching)
15. What is t-test and z-test? What is it used for?
16. What is normal distribution? Give a real life example of normal distribution? Does the distribution of heights of people in a city in a given year follow normal distribution?
17. Why is linear programming a subject in itself? (I could not answer this question ...)
18. What have you studied in AI? What is a genetic algorithm? Give an example (practical use) where you may apply genetic algorithm?
19. What is NP-Hard problem? What is NP-Complete problem?
20. What DS will you use to reverse every word in a list of words?
21. Which book did you refer for studying networks? (Tanenbaum)  Who is Tanenbaum, a Girl or a Boy?    You know any senior, from DU placed in one97?
Which book did u study C++ from in 12th? Have you heard of a book named Bugga and Kulkarni, who is Kulkarni can you guess? Male or Female ? (He was trying to refer to Vidhya kulkarni ma'am :-|  ), the interviewer was a senior, MCA batch pass out, DU.  
22. What is Data Mining? Industry application of this subject? (followed by my Project discussion: Feature Selection in Data Mining Task) 
23. Which of these is correct? Give the storage representation for each?
int i =10;
int *j = i;
int **k = j;
int **l = &j;
int ***m = k;

24. Write a recursive code to reverse a linked list?


HR Round:
1. How is your experience at one97?
2. Tell me something about your family? about yourself?
3. What do you know about one97 ? From whom ?
4. Your strengths?
5. Your favorite subjects? 
6. What platform have you worked on in M.Sc.?
7. What all programming languages you know? Rank yourself on a scale of 1 to 10 in C++?
8. Will you be able to code insertions and deletions in a tree if I ask u right now? ( I said Yes, ma'am :))
9. When can you join us? (I discussed about my project presentation date), she said yes U r selected and gave me the joining date, there itself.


All the best to all who aspire to be here in One97. :)
Be prepared for long interviews, and the interviews might stretch till 11pm. 

Friday, April 23, 2010

Amazon Interview of Sangeeta Pillai

My Amazon Experience:

Amazon interview experience was awesome. I can write an entire blog over it :D. This is not only because I got selected  :P  :P , but also because during the interview you get to meet so many good  and bright people that your motivation to be one amongst them will automatically increase day by day :) :)

Round 1 (Written): It mainly consisted of some normal Puzzles and data structure Qns. I don’t remember them exactly, but they were quite simple.

Round 2 (Telephonic Screening Round): This focused mainly on DS/Algo
Questions were as follows:
1)      A person can climb stairs in 3 ways: Either a single stair at a time or 2 steps together or 3 steps at a time. So, if you have total N stairs give a recurrence relation to solve the above problem.
2)      You have a circle and a point inside it. You have to find the probability of having the point near to center than the circumference of the circle. This one was pretty easy.
3)      Reverse a stack without using Extra memory (U can use recursion).
4)      If I give you a binary number, get me the nearest multiple of 8 which is greater than the number. Use bit manipulations.
5)      Given a cube of size n*n*n (i.e made up of n^3 smaller cubes), find the number of smaller cubes on the surface. Extend this to k-dimension.
6)      There is an array (of size N) with an Element repeated more than N/2 number of time and the rest of the element in the array can also be repeated but only one element is repeated more than N/2 times. Find the number.

Round 3 (Telephonic Screening Round): This focused mainly on coding (any language)
1)      Given a sorted array of Infinite size, find an element ‘K’ in the array without using extra memory in O (lgn) time. (Remember the array size is infinite that is no upper bound) .I was asked the approach first and then the code. I gave a C code.
2)       Given a doubly linked list such that every node has not only next, previous pointers but also an extra pointer called child pointer that points to some arbitrary node out of the given DLL. But the child Node itself can be part of another bigger linked list. Now write a code for flattening the linked list .remember the child node can itself have its own child nodes and so on ….Hence the level of this hierarchy can go on….
3)      Once you get the output of the above question, write a code to reconstruct the original DLL from the output.
4)      Design a Jigsaw Puzzle with appropriate data structures and give function signatures for the game.








Round 4 (Face 2 Face Interview) The TL of the team which was hiring took this interview
1)      Given an array of size N such that both of its 2 halves are sorted individually. Now we need to sort the entire array with O(1) space . Give the psuedocode for the same.
2)      Find the first K smallest element from 1 million sized array . Assume your ram memory is so small that it cannot accommodate all 1 Million element at once.
3)      What are threads? -- > Race condition à Semaphores àdeadlocks ---- etc etc etc
4)      What is synchronization in Java and what does the synchronization method do. If you have to develop your own synchronization method, how will you proceed?
5)      Given an array all of whose elements are positive. You need to get maximum sum of a subsequence such that no 2 numbers in the sequence should be adjacent in the array. So  4 2 6 10 should return 14
6)      Why Amazon?

Round 5 (Face 2 Face interview) Manager of the hiring Team Took this interview
1)      Tell me about yourself , your work in Kuliza etc etc…
2)      What do you know about Amazon (both as a product and as a company)
3)      Design a Parking Lot using Java classes and data structures like Vectors , hashmaps etc.This question took most of the time .Although I was able to come up with a logically correct design but still he seemed to be dissatisfied as I missed out quite a lot edge cases, which he said are very important and should never be ignored …..

Round 6 (Face 2 face interview) This was taken by a senior developer.
1)      Design and code a crossword puzzle. I was asked to first tell the DS that I m going to use and then the approach. After this he asked me to code my approach.
2)      Given a string , pattern and error count  we need to write a function which return true or false based on the fact that whether the string matched the pattern with an error value given as error count. i.e. suppose string is : “abcdef”  and the error count is say 2 and the pattern is “adef” , then there are exactly two characters missing in pattern to form the string , hence there is a match.
Simialry with the same string “abcdef” , the pattern “adef”  as well as “atcdyf” also matches with error count 2 since in the former there is 2 deletions and in latter there are two replacements.
Write an optimized code to implement the function.
3)      Given a 2X2 matrix. Find all valid words ( a dictionary being given) present in all rows, columns and diagonals in the matrix in the most optimized manner. Write Code also.

Round 7 (BAR RAISER) Betta ,  isme to lag gayi…
The specialty of Bar raiser round is the fact that here you will be interviewed by 2 interviewers at the same time. Although only one of them  may be asking qns , but the other one would constantly be observing you and making notes of your spontaneity , enthusiasm ,  and of course  attitude. The one who asks qns will concentrates on your approaches and code.
Instead of giving the questions, I would like to give my suggestions over here coz I felt that your attitude matters the most here.
For clearing this round I will suggest the following:
a)      Never lie in your resume.
b)      Never write about project or technologies on your resume which you are not confident about.
c)      Tell the truth and be honest .It will help.
d)      Tell the roles played by you in your current company in as much detail as possible.
e)      Whenever you are answering any qn (be it designing or coding) , start from simpler soln and go ahead with optimized ones.
f)       Don’t think that your answer may be stupid, because those may indeed be the answers that they are looking for.
g)      They asked me few DS/Algo questions which were easy to start with like they wanted me to store names, marks and other details of students in a school. Then they started adding constraints to their problem like O (1) time retrieval, O (1) time insertion and all. Whenever I suggested a DS, they would introduce a new constraint and so on .Basically they were pushing me to the right DS . I ended up with hash tables but still in hash table we can have collisions because the key here was not ID of student but last name, first name combination. They now wanted me to give them a hashing algo which introduces no collision. (solution : Perfect Hashing)
h)      In this round there is no chance that you get familiar questions. So, don’t get disappointed by the questions as it is also possible that the qns may not have any optimized answers. For e.g. they asked me an NP complete problem. I tried my level best sitting there trying to figure out the optimized solution. I gave them many solution, but all failed some or the other way .In the end they told me that it was NP complete .But throughout the discussion for the question the person observing me was making notes and the person asking the questions was giving me hint just to ensure that, if given hints will I be able to progress ……

Round 8 (Final Round) Finally, the Hiring manager round. The person who took this interview was the Project manager for the hiring team.
He asked me questions related to Oops and since in KULIZA I worked on java also, he asked me some amount of java also like difference between hash maps and hash  tables , refection methods in java etc..
Since In Kuliza, we use Spring framework for our web –applications, he asked some basic questions about MVC framework also.
In the end he asked me a puzzle, which I was able to solve after he gave me a hint.
Interview was over after his and I went home. J