Contact Details:

Mail : amarnath255561@gmail.com

Sunday, December 22, 2013

Oracle Interview Experience 2013



Pattern : written + 3 Tech Interview + 1HR

Type : Online

cgpa criteria :NO

Written exam Modules:   2hrs       (no -ve marking)
1.coding skills(comprehension oriented)
2.computer science knowledge (basic)  
3.software engineering aptitude      
4.Written English

Tips:

Try to get the oracle Questions from the other IIT's or NIT's , because it repeats the same.By the time IITD starts written's almost all NIT's placements get completed.

"Be individual and solve them" 

Shortlisting Information:
Almost every one gets shortlisted. I heard that if at least you do 60% of them perfectly ,you'll get shortlisted.

My Interview Experience:


Before I get into the interview panel, i was feeling tensed to crack it at any cost. As i was having 3 companies interviews on the same day ,same time I chose to go for oracle as it is easy to crack and i asked the IIT student volunteers to manage by changing the slots of other interviews.

Round 1:(1hr)
1. asked algorithm of Towers of Hanoi problem with 3 piles.
2. Now he changed the no. of piles to 4 for the above question.
3. Discussed the time complexity and analysis of the above algorithm.
4. gave DESIGN question "suppose if there is traffic management system database ,then if it goes into the deadlock, what happens and design such system such that it resolves many problems ".No clear information was given and it's vague. So i explained it by using distributed system concepts. He was impressed.
5. Given an array of n integers(consider +ve and  also -ve) ,find an sub array such that sum of that array s maximum.
6. aptitude: Two poles each of length 15 m are at distance d. A rope of length of 16 m is tied from the top one pole to the other. Distance between lowest point of rope and ground is 7 m. Find distance d
7. He asked me whether i know chess or not because he wanna frame a question on it. I said "NO :-p" then he skipped it.(but i know how to play chess)
8. Advantages of C language over C++ (really tough one ,as he was expecting 10 points)
9. Multi Threading , Multi Process and Context switching concepts(in depth)
10. code of Level Order traversal of binary tree and nary tree
11. Some silly Questions.
12. Major Project


Round 2: (45 min)
1. he gave me the code of lengthy C# program and asked the output of it.
2. Same as first again.
3. He gave Aptitude question(some comprehension -5 questions)---- very tough
4. Tortoise and hare algorithm

Round 3:(40 min -STRESS interview)

1. Asked Course projects and requires in depth details of it.
2. He gave some comprehension type of aptitude to solve 5 sub questions of it within 5 min.
3. Gave me a puzzle.
   I solved it by substitution method  but he started scolding me saying that why couldn't you solve it generically.
  In case of my friend case,when he solved generically,he started scolding him saying that who said you to solve generically.
  So finally his intention was to make you feel more stressed.
4. HR related questions.


Round 4 :(30 min-HR)

basic HR questions.
try to make them feel like you will definitely join their company.

i thought that i would get rejected because of 3rd round as i was thinking it happened only to me,but when i asked my other friends even they have the same status.

Finally they said that they will disclose the results in the evening.(selected finally known in the evening)


As the result was not disclosed, i went to attend the other interviews.
here is my INTEL Experience

INTEL Interview Experience 2013



They had taken only one round for me but for other they were taking two rounds. I know that i would get selected by first round itself as that guy is much more interested in me.

Pattern : Resume shortlist + 1 (Tech Interview + HR)    (1HR 30 min)

cgpa criteria : yes

Shortlisting Information:

1. having >=8.5 cgpa
2. Architecture Project.
3. Job experience in a good reputed company like(oracle, cisco)

you will get shortlisted only if u have either points {1+2} or {(3)+(>=7.5 cgpa)} from the above three points. So check and apply.


TIPS:

prepare for questions on your project in depth and " try to show them how it would benefit their company ".

Interview Experience :


Round 1: (Discussion Oriented)
1. explain MTP?
2. asked 10-15 questions on MTP only
3. asked to design architecture for the new problem statement.Discussion went on for 30 min
4. Xilinx Simulator questions
5. course projects

it took almost 1 hour and then he said we will go into HR directly. I said OK.
then HR questions(30 min)
after that he asked me
any Queries??
I asked him about the life of fresher at Intel. While he was explaining, in middle he mistakenly said that he would specially give me training at Intel. I was smiling for his statement, then he said If you are Selected(smiled each other :-p).
I am sure that i would get selected as the interviewer was much more impressed and interested about me.

I was waiting for my Round 2.

As the time went on..
I was feeling tensed because they were calling others for the second round, but they were not calling me.
Then I proceeded for other Interviews.
I got to know the result in the evening, finally they have selected me just for 1 round :) :)

Dell Interview Experience 2013


Pattern : written + 2TECH + 1 HR(But for me 1Tech + 2HR)

Type : Online

Cgpa criteria : NO

Written exam Modules :  60 questions    70min   (no -ve marking)
Aptitude -time taking
OS
Data structure
Database
Computer Networks

Tips :

Try to read gate material from geeksforgeeks. many of the questions and concepts are from it.

"Be individual and solve them" 

Shortlisting Information :

If you can answer at least 40 questions, you'll get shortlisted. 
They shortlisted 15 candidates for interviews and also they called  8-10 waiting list  candidates for interviews.

My Interview Experience:

It was around 5:30 PM. Dell Interviews are about to complete but i haven't even completed with one round of Dell as i was busy in giving other company interviews.As my Selection status of other companies are not yet disclosed ,I couldn't take the risk of not attending that interview.

Round 1 : (35 min)
1. code of Inorder recursive and non recursive
2. Questions on sorting like
    best algorithm if u consider (no. of swaps, no. of comparisons etc)
3. Sorting words in a large file.
4. T9 Dictionary(most important question of many companies).
5. Insertion sort code (they look for each every corner cases,so better check ur code  with all types of test cases and then ask the interviewer to review it )
6. course projects
Then he asked to wait for second round.

By that time ,those guys(DELL interviewers) have decided to take only 10 members and they already have the count and they were calling the selected candidates and congratulating them and for my friend they have specified the field and under whom he would be working.  As the count have been reached, those guys are not interested in me, they would like to take my interview just for formal.
I understood the scenario and i should create an special impression about me to get selected and increase their count.
Round 2 : (30 min Tech + HR) 
Interviewer was the best guy among the other interviewers i met till now. Awesome experience with him. I felt like I was speaking with my friend and some times we were cracking jokes on each other.

Basic HR questions
1. Tell me about yourself
2. +ve's and -ve's
3. Explanation of Course Projects(discussion oriented went for 20 min)
4. Show me an example that you are good at team work.
5. course projects
6. Finally he asked me to say about DELL as much as i know?
But really speaking, I don't know anything more about the company information.But i said only one sentence
"DELL,  The main weapon of  most of the Computer Science students over here and every where."

By that one sentence he was impressed more and he gave me one best complement.

"You have good narrating and management skills.You can be recruited into HR management and can come to IITD again next year to recruit your juniors"
It was an awesome feeling when he said that sentence and now am sure that he would increase the selection count.

He said me to wait for Round 3.

The DELL and INTEL interview panels are beside each other. DELL and INTEL interviewers were talking to each other and they were looking whether there are any candidates who are common in both. I heard my name.

The moment I heard my name,I was feeling tensed about my selection status in INTEL because they may remove my name from the List.

After Sometime I heard that INTEL results have been give to TNP Placement cell. I requested the INTEL Volunteer to say about my status, but he didn't. So I asked my friend ( Niranjan - TNP PG coordinator) to go to placement cell and to know my status. He came back and said that i was Selected for INTEL :) :)
At the same time the interviewer called me for third round.

Round 3: ( 5 min)

I said that I was placed in INTEL and gave more priority to it and am not interested in ur's . He said he was impressed with my frankness and  ended the interview over there.

I was feeling Happy as i know that i was selected for INTEL ,at same time Dell released their results even though am not interested they selected me first and stroke through and put me in the waiting list. Further in the next day morning my rejection helped my friend to get that job who was next to me in the waiting list. I felt happy for not accepting that job and that too it helped my first year roommate to get that Job. doubled  my happiness  :)

After i got to know the DELL results, within in short span Oracle released their results and i was in again. As the job location was in Hyderabad my hometown, i was in dilemma whether to opt Oracle or Intel. After some suggestions of my friends ,seniors and Teachers  I chose INTEL finally :) :)

Happy Ending  :)






Walmart Written Paper 2013


Type : online

Platform : Interview Street

Hint : You will be allowed to use IDE's to code.

10 MCQ + 2 Coding Questions - 90 min

IIT D:

coding questions :

1. Chef has an array of N integers. He wants to play a special game. In this game he needs to make all the integers in the array greater or equal to 0.
Chef can use two types of operations. The first type is to increase all the integers of the given array by 1, but it costs X coins. The operation of the second type is to add 1 to only one integer of the given array and to use this operation you need to pay 1 coin. You need to calculate the minimal cost to win this game (to make all integers greater or equal to 0)
Chef has an array of N integers. He wants to play a special game. In this game he needs to make all the integers in the array greater than or equal to 0.
Chef can use two types of operations. The first type is to increase all the integers of the given array by 1, but it costs X coins. The operation of the second type is to add 1 to only one integer of the given array and to use this operation you need to pay 1 coin. You need to calculate the minimal cost to win this game (to make all integers greater than or equal to 0)

Input

The first line of the input contains an integer N denoting the number of elements in the given array. The second line contains N space-separated integers A1A2, ..., AN denoting the given array. The third line contains number X - cost of the first type operation.

Output


For each test case, output a single line containing minimal cost required to make all the integers greater than or equal to zero.

Constraints


  • 1 ≤ N ≤ 105
  • -109 ≤ Ai ≤ 109
  • 0 ≤ ≤ 109

Example

Input:
3
-1 -2 -3
2

Output:
5

2.Input is again array of integers(can be negative also), and two numbers L and R (L <= R). Output the number of subsets who have sum between L and R inclusive.


IIT R:


1. Sql Query is given over a small database and we need to find out natural join.

2. If two threads are incrementing a variable 100 times each without synchronization,what would be the possible min and maximum value.
Ans: min:2,Max:200...

3. a c program we need to find out complexity of code.

4. In dijkstra if use d­ary heap then complexity?

5. support and confidence for a transaction.support and confidence for a transaction

6. give Matrix M1:10x100 M2: 100x20 M3: 20x5 M4: 5x80 find minimum multiplication required:(gate 2011 question)
Ans : 19000

7. Expectation question R = l is what?(gate 2011 question)
ANs : R>=0

8. given f(x)=  1⁄6  for x = 0,1,..,5 and x is the number of cakes sold by a baker on one day. theprofit is $1.00 / cake and loss is ­$0.40/ cake then what is the number of cakes he shall bake ?
note: cakes can not be stored for next day

9. linklist having a loop than some constraint is given on it we need to find out which is true.(easy one)

10. Don’t Remember.

11. Walmart  coding question:
we have stream of palindrome in increasing order like:{1,2,3,4,5,6,7,8,9,11,22,33,....101,111,121,131...212,222,232,.....}and they are forming a
n­digit number like: number = 12345678911223344.....101111121131..(all palindrome in increasing order) then we have to find the kth digit of the number.


12. Engineers at @WalmartLabs have decided to call any integer(+ve, ­ve or 0) that is divisible by at least one of the single digit primes (2, 3, 5, 7) as Walprimes. Thus ­21, ­30, 0, 5, 14 etc are Walprimes, while ­121, 1, 143 etc. are not Walprimes.
Now, consider a n­digit integer d1d2d3..dn. Between any 2 consecutive digits you can place either a (+) sign, a (­) sign or nothing. So, there are 3(n­1) different expressions that can be formed from it. Some of the expressions so formed may evaluate to a Walprime. For example, consider the 6 digit integer 123456: 1 + 234 ­ 5 + 6 = 236, which is a Walprime, but 123 + 4 ­ 56 = 71, which is not a Walprime.

Your task is to write a program to find the no. of expressions (out of the possible 3^(n­1) expressions) that evaluate to a Walprime, for a given input. Note that leading zeroes are valid. For example, if the input is 1202004, it can be split as 12 + 020 ­ 04 etc. Also, the input itself can contain leading zeroes.

Input format: (Read from stdin)The first line of input contains a single integer 'T' denoting the no. of test cases.
Each of the following 'T' lines contain a single string 's' (of length 'n') denoting an input for which you need to find the no. of valid expressions evaluating to a Walprime.
Output format: (Write to stdout)
Output exactly 'T' integers (one per line), where the ith line denotes the no. of valid expressions that evaluate to a Walprime for the ith input string. Since the output can be large, print all the quantities modulo 1000000007.

Sample testcase:
Input:
2
011
12345
Output:
6
64

Explanation:
For the first test case, s = "011". There are 3^2 = 9 valid expressions that can be formed from this string, namely {0+11, 0­11, 0+1+1, 0+1­1, 0­1+1, 0­1­1, 01+1, 01­1, 011} . Out of these 9 expressions, only the following 6 of them evaluate to a Walprime: {0+1+1, 0+1­1, 0­1+1, 0­1­1, 01+1, 01­1}.
Constraints:
There are 3 data sets.
For the first data set (5 points) ­
1
For the second data set (10 points) ­
1
For the third data set (15 points) ­
1

IIT KGP:

1. Cube to be painted with 6 different colours on 6 faces..how many possible cubes?if on rotating 1 configuration, we get another, then that is not to be considered.
Ans :30 ?(5!/4)

2. (777^333 - 333^777) what is the digit at one’s place(LSB) in the resulting no.
Ans : 0 ?(7^333%10=3; 3^777%10 =3)

3. n elements unsorted array (their values are in range 0 to k-1)..minimum time to calculate median

4. linked list with last node pointing to one of the previous nodes(cycle)..how much time required to detect the cycle and make the last node point to NULL(i.e to remove the cycle)

5. O(n) complexity is required to calculate n/4 th sorted element of an unsorted array
quicksort pivot element is chosen to be that.what is worst time complexity of quicksort

6. Infinitely large no of elements in a b-ary tree. b is given. U need to search for an element at finite depth. possible methods BFS,DFS,iterative deepening depth 1st search (IDDFS). Dn some statements given about their complexities. This 1 was a multiple correct question.

7. n arrays to be sorted by merge sort. time?

8-
9-
10-

11. Piles of coins are given (ex. 5 piles : 9,0,5,1,5 ) total 20 coins.. The minimum no. of moves required so that all piles have equal no of coins (4,4,4,4,4) (ans for this is 9 moves) Rules: one coin can be moved to only adjacent piles..i.e. jth pile coin can be moved to j-1 or j+1 if they
exist

Level 1 : n < 10
Level 2 : n < 100/1000
Level 3 : n < 10^6

12. Tiles in the form of a string consisting of only B or W ex. “BWW” , “BBBWWBB” ..etc
given n tiles..find the largest possible chain of tiles by joining them..
Joining rules:
The last letter of a Tile should match the first letter of other tile.then they can be joined
ex. BW and W WB are joined as BWWWB but BW and BW cant be joined


Level 1 : n < 10
Level 2 : n < 100 or 1000 (don’t remember)
Level 3 : n < 10^5


IIT B:

10 MCQs
2 Coding Questions:
1. Given two numbers L and R, find the highest occurring digit in the prime numbers present between L and R (both inclusive). If multiple digits have the same highest frequency print the largest of them. If there are no prime no.s between L and R, print -1.
Testcases:
L=1, R=30, Ans=1
L=13, R=13, Ans=3
L=4, R=4, Ans= -1

2. Given a string s of ‘H’s and ‘T’s denoting heads and tails, there are 2 possible moves at every point:
a. Flipping a ‘T’ by ‘H’ or ‘H’ by ‘T’ is a valid move
b. Switching every character of a prefix of s, i.e., for any 1<=m<=n, replace all Hs with Ts and all Ts with Hs in s[1...m] is also valid.
Find the min. no. of moves to convert a given string into all ‘H’s.
eg: HHTH =>flip 3rd position => HHHH
HTTT =>(flip prefix) => THHH => HHHH

IIT M :

Coding:
1. Given a string ( with only ‘a’- ‘z’ characters and of length N), find the number of permutations that are palindromes.

2. There a N piles of coins. Array ‘A’ of length N contains the number of coins in each pile. Array ‘C’ of length N contains the cost to add/remove 1 coin to the corresponding pile. Goal is to make the array ‘A’ contain equal values. What is the minimum cost? Infinite supply of coins is allowed.

Strand Life Sciences Written Paper 2013


IITD :

Type : Paper-Pen

Duration : 90 min

Marks :100

Selection : have to score at least more than 85 marks.

1.We are performing sum of individual digits for all number from 1 to 10,00,000.We have to find the no. of 1's and 2's obtained [5 Marks]

2. One C output question[5 Marks]

3. Again C question,one code is given we have to find how many a and b pairs are possible.[5 Marks]

4. One Reasoning question[5 Marks]

5. which code runs faster in one array is accessed in row major order and in other array is accessed in column major order.[5 Marks]

6. We have to derive the closed formulae for maximum no. of regions formed from n lines.[ 15 Marks]

7. Check two strings are anagrams or not.[15 Marks]

8. N queen problem code.[20 Marks]

9. Nut bolt problem code.[30 Marks]


Samsung Written Paper 2013


Type : Pen- Paper

Duration : 45 min

20 MCQ

very basic questions

IIT D,M,K,KGP :

20 MCQ questions.
Very basic of C and data structure like post order traversal is left, right, root.

1 question on free(ptr)

1 on realloc()

1 code on doubly linked list .. choose the correct output

1 on which is shortest path algo ..... options wer krushkal, dijktras, and two other random options

one question on size of ptrs ....

 2 to ­3 questions pointer to functions

one on inorder traversal

Nutanix Written Paper 2013


IIT D

2 Coding Questions - 90 min

Type : Online

Platform : Interview Street

Hint : You  will be allowed to use IDE's to code.

1. given a set of numbers, find the maximum sub sequence which is bitonic, also report the elements in this sub sequence.

2. You have been given two integer, large means their range may exceed the normal integer ranges, your task is to multiply these two numbers.

NEC Written Paper 2013,


IITD :

Duration : No time limit

Selection : average time to complete it is 20 min. So try to finish it within
20 min.

68 Personality based questions. Each involves 4 options and to tick most and least in
yourself. 

Microsoft Written Paper 2013


Type : Online

Platform : Cocubes

Tip : MCQ bits will be repeated mostly from previous year papers or get the questions from the other IIT's who had completed their written exam.

2 Rounds:
1st Round : 15 MCQ      After this Shortlisting will be done for Round 2

Selection criteria(for us) : have to attempt at least 10 Questions correct out of 15.

2nd Round : 2 Coding Questions  1 Hour

Questions may differ from person to person

Collection of all bits from all IIT's :

1. 48 bit architecture, what is size of virtual address space?

2. 1 rabbit couple. Couple will start producing other couple only when their age is one month.Initially in first month one couple is there. how many couples will be at the end of year.
Hint Fibonacci series 233

3. Some cpp codes. and asked output. (i.e. Virtual Functions)

4. C codes and output.

5. Find bugs in given code.

6. Complexity of BFS if adjacency list is given.

7. What is used in Demand paging
a) sequential search b) binary search …

8. If pointer to function is declared the how to call that function.

9. If we add a constant weight to each edge in a graph will the shortest path “between any two vertices” change ?
Ans: (May or may not change) //*this will be Depends, not NO, consider a graph whose one path from A to B has 4 edges of 1 and other path with 2 and 3, now add 1 to all edges..now shortest path becomes 2 and 3*

10. how many '0' in 100! ? ans: 24 (100/5+20/5+⅘)

11. For recursive Fibonacci , what is its complexity ? ans : O(2 pow n)

12. i=2, printf("%d%d",++i,++i) ans: 4 4 /*sequence point concept in C comes into picture here*/ (depends on the compiler ??) ( it depends on the compiler, giving 4 3 here (where?))

13. int c[]={2,3,4,5,6},
int *p=c, int *q=c,
(1)for(i=1 to 5){printf("%d",*c); q++}
(2)for(i=1 to 5){printf("%d",*p); p++}
ans : 2222223456(it should be continuous because no \n is there.)
Many questions were of the kind : give the output of following C/C++ code

14. x=4|3<<4 ; x= ? ans : 52

15. x= 2, y= 4, z=10 ; if (x<y<z) {printf("abc")} else {printf("pqr")} ? ans : abc

16. x=1; mask = ~(x<<5 1) What is
(1) mask & 48
(2) mask & 64
(3) mask & 121
ans: 32 64 105

17. In an page fault system implementation , what is “good” way to access pages ? and
(1) Linear search
(2) Arithmetic indirection
(3) Binary search .
(4) Vector Operation
Correct Ans: Option(
4)and (1)..it was a multiple correct type………

18. which of the foll gives most efficient way to access elements sequentially?
(1) LL (2) DLL (3) vectors

19. what is the output ?
class A{
public: void foo(){
printf("a");
}
};
class B : public A { public: void foo(){printf("b")}};
class C : public B { public: void foo(){printf("c")}};
void foo(B &b){
b.foo();
}
main(){
C c;
foo(c);
}
output :b

20. What is the data structure that has O(log n)complexity on averaging for the operations:
search, insert, delete.

21. Find the output:
#include<stdio.h>
int fun(int num) {
while(num > 0) {
num=num*fun(num1)
;
}
return num;
}
void main() {
x = fun(8);
printf(“%d”,x);
}
ans: 0

22. Find the output: int fun(int num)
{ if(num<3)
return 3;
return num+fun(num2);
}
main()
{
int x=fun(12);
int y=fun(13);
printf(“%d %d”,x,y);
}
43 51

23.
code 1:
 int MAX=1000;
int a[MAX][MAX];
for(i=0;i<MAX;i++)
for(j=0;j<MAX;j++)
a[j]=i*j;

code 2:
int MAX=1000;
int a[MAX][MAX];
for(i=0;i<MAX;i++)
for(j=0;j<MAX;j++)
a[i]=i*j;
Which is correct?
a. code 1 is faster
b. code 2 is faster
c. both are same in RISC architecture
d. both are about same

24. class A
{
public: A(){cout <<”AC ”;}
~A(){cout <<”AD “;}
};
class B: public A
{
public: B(){ cout<<”BC “;}
~B(){cout <<”BD “;}
};
main()
{
B *b1 = new B(); B b2;
}
Ans: AC BC AC BC BD AD

25. int fun(int num)
{
if(num < 3) return 3;
return num + fun(num2);
}
main()
{
printf(“%d %d\n”, fun(12), fun(13));
}
Ans: 43,51

26.int n = 1000, c = 5;
do{n/=c;}while(c)
;
printf(“%d”, n);
Ans: Arithmetic error (divide by 0)

27.unsigned int a=1;
unsigned int b=~1;
int z=a*b;
printf(“%d”,z);
Ans: 2



Round 2 :

IITB Coding Questions :

1. Given a 2D matrix. Each cell was filled with a specific color denoted by single character eg.
for blue ‘
B’. If one position is clicked (x,y), colour present at that position would be deleted. If
the same colour is present in neighbourhood (up/down/left/right) then it would also be deleted.
After deletion blank spaces will be replaced by the value present in the cell above that. In case
no value present above the cell then blank entry will be replaced by 0.
Input
x:1 y:1
BGB
BGG
BBB

Output
B00
B0B
BBB

2. Given a linkedlist
swap the alternative nodes (assume list have even number of nodes.)

Input : 11->12->13->14
Output : 12->11->14->13

For IITB guys because of cocubes platform Problem, they have got the Re-Test again

1) check is two words are anagrams.
2) Delete every nth node in a linkedlist.
     Let the LL be, 1->2->3->4->5 and n = 2,
     then resultant list will be: 1->3->5

IIT D, IIT R,IIT Kgp Coding Questions :

1. prune all the nodes from a BST which are not in the range minValue and maxValue
2. print last 10 lines of a very large string

IIT G Coding Questions :
Q.1. In a TicTacToi game two players are playing where player 0 is denoted as 0 and player 1 is denoted
        as 1.Given a linked list of moves made by the players determine who is the winner and in how many moves he required for winning.(You have to just print )…
Struct Move{
int p; //Player number
int x; //x and y pos in the tictactoi
int y;
struct Move *next;
};
The sample function to write is:
void playGame(struct Move *move, int N)

Q.2.Given an array if in a position let a[i][j] =1 then print all it’s row and column 1. You should not
consider a position 1 after you made it 1 in your past computation.
sample(input):
(i)00100 (ii)10
   00000      01
output:
(i)11111 (ii)11
   00100     11





GroupOn Written Paper 2013


IIT D:

Type : Pen-Paper

NO seating arrangement , common questions and same sequence :) and I haven't said anything about what to do 

2 Written exams:

1st Written (30 min) : contains aptitude, C, C++ questions

2nd Written (1 hour) : 3 Coding Questions

1. Find out the maximum contiguous circular sum in array,array may contain positie as well as negative numbers.

2. An array contain n elements, such that next number is obtained by adding either +1 or -1 to previous element. Search any number without using linear scan.

3. Generate a matrix of size m x n such that matrix contains numbers from 1 to mn in spiral order.

example:
3 * 3

output:
1 2 3
8 9 4
7 6 5

Google Written Paper 2013


Selection Criteria : Selects the one who writes the Most efficient algorithm

IITG, IITM, IITR, IITB, IITKGP, IITK - Same Paper on Same Day

Type : Pen-Paper

20MCQ + 1 Code writing

MCQ :

Same Previous paper of 2012 was repeated.
Link : https://www.dropbox.com/s/v3eyb56v8kbqu1z/Google.pdf

Coding Question :

In a language, there are only 4 characters ‘h’, ‘i’,’r’, ‘e’. and we have to write a function which
takes a string as input and returns whether the given input string is a “valid word” or not.
Define of valid word :
1. A given word is a valid word if it is of the form hninrnen where n >=1.
2. Valid words has concate nation property i.e. if w1 and w2 are valid words w1w2 is also a
valid word.


IIT D:


Type : Pen-Paper

20MCQ + 1 Code writing

MCQ :

Same Previous paper of 2012 was repeated.
Link : https://www.dropbox.com/s/v3eyb56v8kbqu1z/Google.pdf

Coding Question :

instead of giving the complete partition of sequence,only finding the minimum no of pages
assigned was asked.




FlipKart Written Paper 2013


IIT D :

Type : Online

Platform : Interview Street

Duration : 90 min

Hint : You can use IDE's to code.

20 MCQ + 2 Coding Questions

Coding Questions :

Q1. There are m stations and n houses, (x,y) coordinates of each station and house are given, output nearest station for each house

Q2. n coins are given,you play a game against an opponent, you need to pick one coin at a time from either end, person having minimum coin values will win, also there is a golden coin with value 0,if a player picks a golden coin then he wins immediately. Find out the minimum possible values of coin needed to be picked by first player for winning.

IIT M:


Some MCQs are:

1. how many bits are required to represent mac address

2. last non­zero digit in (551)!

3. minimum number of nodes in a complete binary search tree

4. how many ways a garland of atleast 2 roses,3 lilies, 1 lotus..flst 5 flowers can be formed?

5. which data structure is used for efficient sequential insertion and searching?

6. we have to store the likes in facebook so that the people who liked this are showed in sorted order(alphabetically). Which data structure can be used?

7. digital signature in cryptography is ( a. symmetric b. asymmetric c.both(a & b) d. advanced), Some RDBMS qs Unix commands ,Network qs

Coding:
1. Find the botttom view of a binary tree.
2. Don't remember

Directi Written Paper 2013


IIT D :

Question 1:  You were given a Binary Tree (not necessarily a Binary Search Tree) to play with,
say T. T had some special properties
Each internal node in T had exactly 2 children
Each internal node in T was represented by an uppercase English alphabet (A­-Z).
Each leaf node in T was represented by a lowercase English alphabet (a-­z)
You were told remember T as long as you could. Hence, you memorised the string formed by
traversing T in post­order. You used something similar to the pseudocode below toPostOrderString (node)
if node is leaf return node.value
else
T = ""
T = T + toPostOrderString(node.left)
T = T + toPostOrderString(node.right)
T = T + node.value
return T
Now, time has come to use that string again. The Eye has contacted you. Yes, the secret
organisation mentioned in "Now you see me" ( don't tell anyone they are real !! )
You remember the string you memorized back then. You must reconstruct the binary tree T.
You are also given a string A. All the characters of A are uppercase English alphabets. Let us assume that T has L leaves. Then, there will be exactly L paths from the root to the leaves ­ 1 unique path to each leaf.
You have to tell The Eye the number of paths out of L, on which, A exists as a sub­sequence.Look at the explanation for the Sample Case 1 for clarity.
You have to implement the method explore Paths in the code. explore Paths is passed the following parameters, respectively
N, the number of nodes in T
S, the string representation of the post­order traversal of T. Of course, the length of S will be equal to N.
K, the length of the string A
A, the string you must find in the paths from the root of T, to the leaves in T.


IIT R :

1. Given N,O where N=No. of digits that can be displayed on calculator and O=No. of
multiplication to be performed.
The numbers used for the multiplication can be from {2,3,...8,9}
2<=N<=8
2<=O<=30
write function that will return the largest num that can be obtained after O multiplication.

Eg: N=2, O=3
the function should return 98, since the maximum no. generated after 3 multiplications 2*7*7. function should return ­1 for error or invalid.

2. Given N set of points with X and Y coordinates.
1000<X[i]<1000
1000<Y[i]<1000
We have to calculate the length of the square that be constructed out of these points having
following features:
i. The points should lie on the square,
ii. The sides should be parallel to X or Y axis.
iii. The square should be constructed with minimum possible length.
Note: It is possible that all the corners not be the points.
For eg:N=5
X[]={0,2,3,5,7}
Y[]={3,0,0,0,3}
function should return 7
in case the square can't be formed or any other error return ­1

IIT G :

There were 11 test cases to pass for each question.

Q.1. Repeated from IIT Roorkee Q1.

Q.2. The question was very big with a story of IPL team selection. The summary of the story is:
Royal Challenger needs to form a team of X players. Each of the Y fans of Royal Challenger can
select X players of their preference. The team management have a criteria that, at least one player
have to be in the team from each of the fan’s preferences. So, find the minimum number of
players that can satisfy each of the fan’s preferences. For erroneous conditions return ­1.

Example:
numberOfPlayers  = 5
numberOfFans = 3
fanspreferences =
{
“10000”
“00100”
“00010”
}
output = 3
numberOfPlayers  = 4
numberOfFans = 3
fanspreferences =
{
“1000”
“0100”“0101”
}
output = 2
Given function signature:
int findminimum(int numberOfPlayers, int numberOfFans, char **fanspreferences)
{
}
http://www.careercup.com/question?id=5734638857224192


IIT KGP :

Q.1. Repeated from IIT Delhi Q1.

Q2 You are given a string that consists of digits. The string contains not only digits, but matched
round ­brackets as well.
Examples of such strings are
● "1234(56)"
● "03(5(68(42)7))"
Note that the round­brackets will always be matched, meaning
● The number of opening and closing brackets is exactly equal
● There will be no prefix that contains more closing bracke
"1234(56)"
"03(5(68(42)7))"
Note that the round­brackets will always be matched, meaning
The number of opening and closing brackets is exactly equal
There will be no prefix that contains more closing brackets than opening brackets
 In this string, the opening bracket is always preceded by a digit.
Now, you go through several iterations to get rid of the round brackets. The iteration
proceeds as
If the string contains round brackets, pick up any matched pair of round brackets that you
find
Repeat the entire expression within the round brackets, exa
ts than opening brackets In this string, the opening bracket is always preceded by a digit.
Now, you go through several iterations to get rid of the round brackets. The iteration proceeds
as
● If the string contains round brackets, pick up any matched pair of round brackets that you
find
● Repeat the entire expression within the round brackets, exactly as many times as, the digit
that immediately precedes the opening bracket in the matched pair
Note that the string after eliminating all the round brackets will always be the same no matter in
what order the round brackets are picked for expansion.
For example, consider the string "42(30(1)4(21()))8"
● We first pick up "(30(1)4(21()))" and repeat the expression inside the brackets 2 times.
● We do it 2 times, because the digit 2 immediately precedes this bracketed expression in
the string.
The string now becomes "430(1)4(21())30(1)4(21())8"
● We now pick "(1)" and repeat it 0 times, since 0 is the digit that immediately precedes it.
● Repeating 0 times effectively means that we ignore the expression.
● We can do this for both the "0(1)" substrings of the strings.
The string now becomes "434(21())34(21())8"
● Next, we look at "1()". Since the bracket contains nothing, we repeat the empty string
exactly 1 times.
● This also effectively means that we ignore the expression.
The string now becomes "434(2)34(2)8"
● We can now expand "4(2)" to "2222" in both the instances above to get the final string
"432222322228".
● This string has the length 12.
Implement the method stringLength in the given template. The parameters to  the method are
● S, the string that must be expanded.
Your method must return the length of the string after expanding the expression. Do not try to
actually find the expanded string since this string might be too big to fit into memory. Only
calculate the length and return it. You may assume that the answer is always less than 109. Note
that it is possible that the length of the expression in the end is 0.
You can assume that the input string always is always valid according to the  specification
above.Sample Test Case 1
"42(30(1)4(21()))8"
Answer as described above is 12
Sample Test Case 2
"1(1(1(30(9(12345678)))))"
Answer is 1. The expanded string is "3"
Constraints
● 1 ≤ Length of S ≤ 1000
● The result will be less than 109.
● Any algorithm of complexity O(N2) or better should pass.
Note: Be careful when returning a string in C. Declare "char str[]" globally and return "str". Local
char arrays are deallocated after a methodlevel2 call ends and will produce Segmentation Faults!


IIT K :

Q1. Given a binary tree where value of each internal node is 1 and leaf node is 0. Every internal
node has exactly two children. Now given level order traversal of this tree return postorder
traversal of the same tree.

Q2. same as IIT Kgp q2.(actually i think it is IIT R q2) but in place of rectangle they wanted a
square( just some additional test cases)

Q3. Given a matrix with 1 and 0 as entries. Find the perimeter of squares which enclose all the
1’s.All the 1s are contiguous i.e. there are no isolated 1s.For instance
01000
11100
10000
 here the answer will be 12.

Q4. given a string of the form AB2C3 and an int k.Expand the string as ABABC3 then ABABCABABCABABC.Then what is the kth element. You dont actually have to expand it as it will violated the memory constraints. You just have to find the kth element.

IIT B :

1. Question 1 from IITR

2. Given a 2D array containing dots(.) and hashes(#), find the perimeter of area covered by
hashes.
Ex. Perimeter of area covered by a single hash is 4. That of a couple of adjacent hashes(##) is 6.
For the following input, the answer should be 15.
. # # .
. # . .
### .

DELL Written Paper 2013


IIT D:

Type : Online

Duration : 75 min

No. of. MCQ : 60

Shortlist : have to solve atleast 40 correctly

Hint : all of us had the same sequence of questions :) 

no negative marking

some of its questions are:

1. preorder and inorder are given…. find post order

2. prefix to postfix expression

3. Shortest remaining time first question

4. 2 questions on page replacement strategy (one on LRU and other on optimal)

5. some ques on C

6. one ques on probability using bayes theorem

7. grapes - 74% water and dry grapes - 35% and of grapes are given.. how many dry grapes can be prepared ??

8. village population - 2500…. 65% are women of which 24% are literate…. 38% of villagers are literate. find % of men who are illiterate?

9. pipes P1 and P2 fills tank in 6min and 9min respectively. P3 can empty it in 3min. Starting with P1 and P2 opened for 3 min. Then P3 also opened. How much time to take it to be emptied?

10. some ques on dbms.

11. networks also.

12. unix - zombie process,chmod recursively change permissions,hard link question



Chronus Written Paper 2013


Type : Pen- Paper

Duration : 75 min

IITD :

4 sections of mcq questions with 6/7 questions in each section (-ve marking is there)
sections were : Algo (from gate), Aptitude (one about 5 couple handshake problem), SQL (one about cascading delete),SQL injection and a few web technology related question

Two coding questions :

1. one was about pruning the largest BST segment expanding from the root of given binary
tree.
for example :

     1
    / \
   2 3
output :
1
  \
   3
ITS NOT FINDING LARGEST BST SUBTREE IN A BINARY TREE


2. Two times were given
int noOfClicks(char* clockTime,char* currentTime) in HH:MM format.
There are two buttons to match the clock time with current time. One to increase hours and another to increase minutes.
HH count is from 00 to 23 and again goes to 00 if it is increased from 23. same is for minutes 00 to 59.
minute button is working fine but hour button is faulty. When you press hour button, it increases both hour and minute by 1.
You need to count and return the minimum no of button press to match the clock time with
current time.
Ex:
clock time 03:12
current time 04:15
no of clicks: 3
when hr button is pressed, 04:13
minute button pressed twice, 04:15


IIT B and IIT KGP:

1. Given a square matrix with black and white cells find the size of the largest square, the border of
which has only black cells.

2. Given a million word dictionary, what is the size of the largest rectangle that can be formed such
that each row and each column of the rectangle is a word from the dictionary.

Both the questions are present in the ‘Hard’ section of Gayle’s book.

IIT M:

Given two words, say source, target. Also given a dictionary of words. Find minimum possible
transformations (insert/delete/replace) of source to target such that each transformation forms a
valid word in dictionary. Print all the words during transformation from source to target.
for eg. cat to bed.
cat ->bat ->bet ->bed.