ZS Associates Placement Paper 2
ZS Associates Placement Paper 2
A debugging program rectify 0.128 errors in every second. Approximately how many seconds will it need
to rectify 25 errors?
a) 109 b) 261 c) 195 d) 201
Answer : c) 195
Solution :
Time taken to rectify 0.128 errors is 1 second.
Time taken to rectify 25 errors,
Errors Time
0.128 1
25 ?
Here the number of errors has been increased, so time also increases. Hence error is directly
proportional to time.
? = (25 / 0.128)1
? = 25 x 1000 / 128
? = 195.31
Therefore, time taken to rectify 25 errors is 195 sec approximately.
Question 2
The rotational speed of two connected wheels of a toy car are inversely proportional to their diameters.
A wheel with a diameter of 8 cm and speed of 36 rpm is connected to a wheel of 12 cm diameter. What
is the rotational speed of the second wheel?
a) 24 rpm b) 12 rpm c) 14 rpm d) 20 rpm
Answer : a) 24 rpm
Solution :
One wheel with a diameter of 8 cm and a speed of 36 rpm.
The other wheel is with 12 cm in diameter.
Given that the speed of the wheel is inversely proportional to diameters.
Diameter Speed
8 36
12 ?
? = 8 x 36 / 12 (Since it is inversely proportional 12 / 8 is changed reciprocally as 8 / 12)
? = 24
Hence the speed of the other wheel is 24 rpm
Question 3
If 18 typists are required to type 900 files in 10 hours. Then how many typists will be required to type
660 files in 12 hours ?
a) 20 b) 16 c) 10 d) 11
Answer : d) 11
Solution :
18 typists type 900 files in 10 hours.
Then, 660 files typed in 12 hours by X typists.
Typists Files Time(hrs)
18 900 10
X 660 12
Here, the number of files has been decreased, so the number of typists also decreases - Directly
proportional
Time has been increased but the number of typist is decreased which is inversely proportional.
X = 660 / 900 x 10 / 12 x 18 (Since time is inversely proportional to typists 12 / 10 is changed reciprocally
as 10 / 12)
X = 11.
The number of typist required is 11.
Question 1
Solve the inequality 27
(7x-2)
> 3
a) x > 1/7 b) x > 1/3 c) x > 2/7 d) x > 1
Answer : b) x > 1/3
Solution :
Given inequality is 27
(7x-2)
> 3.
we can re-write 27 with powers of 3 as
[3
3
]
(7x-2)
> 3
3
3(7x - 2)
> 3
1
Let us clear out base 3 from both sides,
3(7x - 2) > 1
21x - 6 > 1
21x > 7
x > 7/21 = 1/3
x > 1/3
Question 2
Solve the inequality 6
(6x-2)
< 1/36
a) x < 0 b) x > 0 c) x = 1/3 d) x = 6
Answer : a) x < 0
Solution :
Given inequality is 6
(6x-2)
< 1/36
Multiply by 36 on both sides, we get
36[6
(6x-2)
] < 1
Make each term as the power of 6
(6
2
)[6
(6x-2)
] < 6
0
Now, using the formula (a
x
)(a
y
)= a
(x+y)
6
(6x-2+2)
< 6
0
6
(6x)
< 6
0
Cancelling the base 6 on both sides,
6x < 0
x < 0
Hence the answer is option a
Question 3
Solve 1/(2
5
) < 2
[(6-2x)
/3] < 4
a) x < 0 b) x > 31/3 c) x < 21/2 d)none of these
Answer : c) x < 21/2
Solution :
The given inequality is 1/(2
5
) < 2
[(6-2x)/3]
< 4
Rewrite the given equation with powers of 2 as
2
(-5)
< 2
[(6-2x)/3]
< 2^2
Let us clear out the base 2 from each term
-5 < (6-2x)/3 < 2
Now, let us clear out "/3" by multiplying each term by 3:
Since we are multiplying by a positive number, the inequalities will not change.
Then the inequality becomes -15 < 6-2x < 6
Now subtract 6 from each part then -21 < -2x < 0
Now multiplying each part by -1/2.
Since, we are multiplying by a negative number, the inequalities change direction.
i.e., 21/2 > x > 0
Arrange the smaller number left, larger number right then we have 0 < x < 21/2
Hence the answer is x < 21/2
Question 1
A railway half ticket( for kids below 5 years) costs Rs. 150 and full ticket(for above 5 years) costs Rs. 250.
The daily report says that for a particular day, 5000 passengers have travelled and the total collection is
Rs.10,50,000. How many kids(below 5 years) have travelled on that day?
a)1000 b)2000 c)2500 d)3500
Answer : b)2000
Solution:
Let 's' be the number of kids travelled on that day and 'b' be the number of passengers(above 5 years)
travelled on that day.
Therefore, s + b = 5000 ... eqn (1)
Each half ticket's cost is Rs.150 and
Each full ticket's cost is Rs.250.
Total collection of amount = 150s + 250b = 10,50,000
Or 150s + 250b = 10,50,000 ... eqn (2)
Multiplying equation (1) by 150, we get 150s + 150b = 7,50,000 ... eqn (3)
Subtracting eqn (3) from eqn (2), we get 100b = 3,00,000
Or b = 3000
We know that s + b = 5000
So, s = 5000 - b = 5000 - 3000 = 2000.
Hence, 2000 kids travelled on that particular day.
Question 2
Small sized pizza costs half the full sized and delivery charge is the same on small size as on the full size.
One boy delivered a full size pizza which cost Rs.2160 for the consumer. Another boy delivered one full
and small for 2 persons respectively where the bill amount was Rs.3270. What is the basic cost of full
size pizza and what is the delivery charge?
a)RS.2100 & Rs.60 b)Rs.1050 & Rs.30 c)Rs.2500 & Rs.90 d)Rs.1500 & Rs.60
Answer : a)Rs.2100 & Rs.60
Solution:
Let the cost of the half of the full size pizza be Rs. X.
Therefore, the cost of full size pizza is Rs. 2X.
Let the delivery charge be Rs. Y per delivery.
Now, one full size reservation pizza would cost 2X (basic cost) + Y (delivery charge)
i.e., 2X + Y = 2160 --- (1)
The total basic cost for one small and one size full pizza = X + 2X = 3X and the total delivery charge is 2Y.
Hence, 3X + 2Y = 3270 --- (2)
Solving (1) and (2) we get,
X = 1050 and Y = 60
Hence, the basic cost of full size pizza is 2X = Rs. 2100 and the delivery charge is Y = Rs.60.
Question 3
A boy ordered 1000 toys for 1000 rupees from a local shop. He knew he ordered some dolls, cars and
cleversticks but he lost his receipt and forgot how many of each he ordered. Also he knew that the dolls
were Rs.3 each, cars Rs.10 each and cleversticks Rs.5 each. The number of toy cars in the order was:
a)1 b)2 c)none of these d)cannot be determined
Answer : d)cannot be determined
Solution:
Let d = number of dolls;
c = number of cars;
And s = number of cleversticks.
The total number of toys is 1000. Therefore we have the equation:
d + c + s = 1000
Given that the dolls cost Rs.3 each, cars cost Rs.10 each and cleversticks cost Rs.5.
Then we have the equation:
10c + 3d + 5s = 1000
Now, We have two equations but 3 unknowns. To solve 3 unknowns at least 3 equations are required.
The given data is not sufficient to derive the answer and some additional information are required.
Hence the answer is option d.
Questions: 1-3 are based on following info.
i. All A,B,C are X
ii. All D are either A or B or C
iii. All E are either A or B or C
iv. All F are either A or B or C
v. Some D are C
vi. All G are either D or E or F
The questions were like which of these is not possible such as
All E are B
Some F are Aetc
All the 3 ques were like this
SOLN: This question can be done using Venn diagram and notice that A,B,C are not mutually exclusive
that is they can overlap
4) Arrange these letters ARGFEFI to form name of an animal and find second letter
Soln: Giraffe
Ques 5-9) were based pn some motorcycle puzzlesuch as A wins , C reaches after D etc.E is driving
bike named as L, Bike named as M comes last. etc
Based on this information we had to answer the questions.
Q) a series was givenwe had to find the odd one
26,50,69,101,145
ANS In this every number is the square of sum number +1 except 69. so 69 is the odd number.
Quantitative had 30 questions.really very simple.to be done in 30 mins
First Tech paper
1 hour
11 questions 1 mark each
2 questions 2 marks each
total 15 marks
1) A code snippet was given based on recursionwe had to answer how many times x will be
printed.
2) Create a reflection of a treethe mirror image
ANS) use recursion and make the left child as right and the right child as the left for every node.
3) One question on automata. A grid was given and we had to answer how many strings are
possible:
end
start
4) xyxyxyzyxyxyx
Traverse this string just once and find if it is palindrome or not.You have to begin from the start
and you cannot move back and have to move sequentially forward.
5) A recursive loop for fibonnaci was given as follows
Int fib(int n)
{
if (n< = 2)
return 1;
else return (fib(n-1) + fib(n-2));
}
Improve this code so that the number of calculations are minimized?
6) Delete the node next to the node pointed to by a given ptr in a linked list in a one line code.
ANS ptr->next= ptr->next->next;
7) In an unsorted array find the 2
nd
largest number in minimum number of
calculations .----2 marks.
8) You are given a sum. Find the path in a binary tree from root to a leaf in which sum of all the
nodes on this path is equal to the given sum.---2 marks.
2
nd
technical paper
45 minutes
10 questions 1 mark each
5 questions 3 marks each.
1) How will you avoid inclusion of a header file twice in a C program?
ANS) Use # ifdef in the header file..REFER Kernighan Ritchie!
2) A matrix is given and we have to transpose it against the reverse diagonal.---3 marks.
3 4 5
6 7 9
1 2 8
Transpose is:
8 9 5
2 7 4
1 6 3
3) Print the hexadecimal equivalent of an integer w/out using sprintf or any of printf family
commands.
4) Find whether the machine is Big-endian or Little-endian?
5) Print the ip address given in integer form , in dot notation .
6) Find the height of the binary tree .
7) Two sorted arrays are given which can contain duplicate elements in each of them.You have to
merge both of them into a sorted array removing duplicates.3 marks.
Eg: 1,1,3,4,6,8,9,10
2,4,5,6,7,8,8,8,10
Ans-1,2,3,4,5,7,8,9,10
8) In an integer,toggle the first bit from right whose value is 1 ?
LIKE:
10110101 01000100
After toggling; 10110101 01000000 Ans: num&num-1
9) Find the output of the code given;the code was from bitwise operator and is the given in Test ur
C skills (last question in bitwise chapter) .ANSWER- it prints the binary equivalent of the number.
BAki aur sab isi type ke the.Bitwise karma achhce se.KnR puri padh lena aur se both saare questions
the. Interview mein bhi isi site se questions the.
amit bhatnagar <[email protected]>wrote:
From amit bhatnagar Thu Apr 20 10:11:50 2006
Date: Wed, 19 Apr 2006 21:41:50 -0700 (PDT)
From: amit bhatnagar <[email protected]>
Subject: Fwd: interview questions
To: ankit A <[email protected]>
CC: anunay <[email protected]>, rahul kesarwani <[email protected]>
Here are the Qs that were asked to Sushil..
Will try to recall as many Qs I can from my interview and get back to you.
-Amit
Sushil Kumar <[email protected]>wrote:
Date: Tue, 18 Apr 2006 19:27:31 +0530
From: "Sushil Kumar" <[email protected]>
To: [email protected], [email protected]
Subject: interview questions
maine lagbhag sabhi questions likh diye hai..
mushkil se ek aadha hi choota hoga.
viney se bhi pooch lena..
us se to aur bhi gande-2 questions puche the OS ke..
keshu bahi ko bhi forward kar dena..
All the best.
Delhi mein hum logo ko Sharaab aur Shabaaab dono hi milegey.
zero interview (HR)
1. intro puchi,
2. area of interest puhne lag gya. yahi tumhara area of interest kuy hai, koi aur kyu nahi.
3. yeh banda mere ko kafi ghumane ki try kar raha tha.
4. computer science kyu opt ki.
5. allahabad mein he kyu admission le.
first interview
1. ask about my project and asked for drwaing the architecture diagram.
2. given a string , write a function to return all the words in the string
3. virtual memory kya hoti, kyu hoti hai.
4. paginging kya hoti, kyu hoti hai.
5. puzzle , there are infinite gates in a row , initially are are closed.
There is a monkey in front of each gate.
Monkey in front of gate 1 , toggle gate number 1,2,3,4,5,...
Monkey in front of gate 2 , toggle gate number 2,4,8,10,12,...
Monkey in front of gate 3 , toggle gate number 3,6,9,12,15,...
Monkey in front of gate 4 , toggle gate number 4,8,12,16,20,...
Monkey in front of gate 5 , toggle gate number 5,10,15,20,25,...
Once all the monkies are done. what will be the state of nth door?
2nd interview
1. why do want to leave current company
2. current project ke baaer me pucha..
3. mera kya kaam a , kya role hai woh sab pucha.
4. tower of hanoi problem , iska code likhwaaya
5. then he asked if you have 5 dics in tower of hanoi problem , tell what will be the moves.
I write the moves directly. Then he asked me not only moves , show all the fuction calls.
6. circular queue ki imlementation.
3rd interview
yeh banda jaldi mein tha,is bande ne jaldi-2 interview liya tha
1. what is thread , what is process. Difference between thread an process.
2. Why we use thread.
3. Bankers algorithm ke bare mein pucha.
4. he asked me in which language ,I am working. I told C#.
Then he asked me difference between C# and C++.
4th interview
1. reverse teh order of words in a string(not the string).
I told him ,I have already solved finding words in the string in last interview.
He told me then leave this problem.
2. find second heighest element in an array. Then he asked to lessen the number of comparisions in the
the program.
3. inorder and preorder traversal of a tree is given. And he asked me how to
4. there a 3 container A,B,C of capacity 15,10,6 liters
A B C
intial cofig is 15 0 0
he wants finally 0 8 5
mere se ho nahi rahi thi , he was helping me like at some steps like I am going right or wrong.
5. there is one string it contains zero's and one's only. write a fuction to move all the one's
at the end of string.
"Good friends are hard to find, harder to leave and impossible to forget.."
Blab-away for as little as 1?/min. Make using Yahoo! Messenger with Voice.zero interview (HR)
1. intro puchi,
2. area of interest puhne lag gya. yahi tumhara area of interest kuy hai, koi aur kyu nahi.
3. yeh banda mere ko kafi ghumane ki try kar raha tha.
4. computer science kyu opt ki.
5. allahabad mein he kyu admission le.
first interview
1. ask about my project and asked for drwaing the architecture diagram.
2. given a string , write a function to return all the words in the string
3. virtual memory kya hoti, kyu hoti hai.
4. paginging kya hoti, kyu hoti hai.
5. puzzle , there are infinite gates in a row , initially are are closed.
There is a monkey in front of each gate.
Monkey in front of gate 1 , toggle gate number 1,2,3,4,5,...
Monkey in front of gate 2 , toggle gate number 2,4,8,10,12,...
Monkey in front of gate 3 , toggle gate number 3,6,9,12,15,...
Monkey in front of gate 4 , toggle gate number 4,8,12,16,20,...
Monkey in front of gate 5 , toggle gate number 5,10,15,20,25,...
Once all the monkies are done. what will be the state of nth door?
2nd interview
1. why do want to leave current company
2. current project ke baaer me pucha..
3. mera kya kaam a , kya role hai woh sab pucha.
4. tower of hanoi problem , iska code likhwaaya
5. then he asked if you have 5 dics in tower of hanoi problem , tell what will be the moves.
I write the moves directly. Then he asked me not only moves , show all the fuction calls.
6. circular queue ki imlementation.
3rd interview
yeh banda jaldi mein tha,is bande ne jaldi-2 interview liya tha
1. what is thread , what is process. Difference between thread an process.
2. Why we use thread.
3. Bankers algorithm ke bare mein pucha.
4. he asked me in which language ,I am working. I told C#.
Then he asked me difference between C# and C++.
4th interview
1. reverse teh order of words in a string(not the string).
I told him ,I have already solved finding words in the string in last interview.
He told me then leave this problem.
2. find second heighest element in an array. Then he asked to lessen the number of comparisions in the
the program.
3. inorder and preorder traversal of a tree is given. And he asked me how to
4. there a 3 container A,B,C of capacity 15,10,6 liters
A B C
intial cofig is 15 0 0
he wants finally 0 8 5
mere se ho nahi rahi thi , he was helping me like at some steps like I am going right or wrong.
5. there is one string it contains zero's and one's only. write a fuction to move all the one's
at the end of string.
ALL THE BEST.