Cisco Systems Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
2
of 2 vote

For Question 1.
a)Divide 10=3+3+3+1.
b).if first two 3 and 3 are unequal, you can get the faulty of 3 and take that bunch and have 1 and 1 and you get to know the faulty one.
c).If first two 3 and 3 are equal,3+1=4 and divide it in 2+2 and you can get the faulty of 2 and repeat for the 1.

- arindamkar1981 November 17, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

2. Take 1 coin from the first, 2 from second, 3 from third..., and weigh them all together
if total weight = x grams, then (5500-x)/10 is the stack number.
All assuming a digital scale. If we have a weighing balance then I believe its much easier problem

- chennavarri November 09, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

this is wrong calculation.

lets say there are 3 stacks. 2nd one is faulty.
Now we have 1 from 1st, 2 from 2nd, 3 from 3rd.

Total : 100+90*2+100*3=580.
Actual=600.
faulty_diff=100-90=10

stack no= (Actual-Total)faulty_diff
=(600-580)/10
=2.

- ashpiy November 09, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Ashpiy. Read the question again. The 2nd question is based on 1st. The question is for 10 stacks and so the answer.

- Anonymous November 09, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

ashpiy: thats not totally true. I changed the solution a little bit but anyways, as Anon commmented, the problem is given 10 coin stacks, 9 of them are 100gms and 1 is 90 gms,
if stack 6 is 90gms then (5500-5440)/(100-90) = 6
if stack 1 is 90gms then (5500-5490)/(100-90) = 1
thanks

- chennavarri November 09, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

for question 1, are the weights integers? if yes, then I have a solution

- Anonymous November 09, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1) Divide into 5 and 5
2) Divide 5 into 2, 2, and 1. Weight 2 and 2.
If 2 and 2 are equal, then 1 is the answer.
If 2 is less, then
3) weigh the ones in 2, get the answer

- Anonymous November 09, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

thats 4 measures. wrong answer

- Anonymous November 09, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

its three measures u dumbass

- Anonymous November 09, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

This is 3 iteration only. but we can improve this approach.

1) first take 4 and 4 (keep 2 separate)
if both are equal then measure these 2 only. (only 2 iteration)
2) if those 4 and 4 are not equal then take lighter one.
now instead of 2 and 2 take any 1 and 1. if they are unequal, it solves the problem. (again only 2 iterations).
3) now if 1 and 1 are also equal then compare rest of two.
this is the worst case when we need 3 iteration.

- ashpiy November 09, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

LOL
Take 4 and 4 and how do you know both are equal. Do you measure twice??
That's already 2 iterations. Now if both are not equal then find the one from 4 using only 1 iteration. Dude read ur answer again.

- Anonymous November 09, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

^^
ashpiy is correct
u r duhh man
take random 8 stacks
put 4 on one side and 4 on the other side (1st weighing)
if they are equal means it is either one of the remaining 2
so u will get answer in second iteration itself
but if they are not then we wont check the remaining 2 so it is still one iteration for this particular scenario
so for second iteration for this particular scenario i will consider the stack which weighed less in the first scenario because it says one stack is lesser then rest others
so now i have 4 stacks left with me
i will put 2 on both the sides (2nd iteration for this case)
then i think it is easy and u wont have any baseless arguements
be polite when u r not better then others
or in your case SELF REALIZATION !!

- Anonymous June 01, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

For the 3rd point also we can do similarly.
6 and 6
then 3 and 3
then 1 and 1.

- ashpiy November 09, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You compare 6 and 6 so measure 6 and then 6.
Then 3 and 3 so measure 3 and then 3
That's already 4 measures

- Anonymous November 09, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Question incomplete. How are the weights measured? Balance or scale??

- Anonymous November 09, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You can safely assume it is balance as it is always the case in this kind of questions.

- anon November 09, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

yep.. as Anon pointed out, the question is incomplete without the measurement mechanism,
if measured using a balance i.e. comparison of weights then it would take lesser measurements in some cases
if measured using a digital scale then its different again.
Thanks

- chennavarri November 09, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

General solution for the 3rd part

iwriteiam. nl / Ha12coins.html

- anon November 09, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

weigh 4 against 4.if the coin is inside any of them. then weigh 2 against 2. then remaining 1 against 1. if the coin is not in the 1st 8 sacks. then weigh remaining 2.

- Anonymous November 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For Question 1.a)Divide 10=3+3+3+1.
b).if first two 3 and 3 are unequal, you can get the faulty of 3 and take that bunch and have 1 and 1 and you get to know the faulty one.
c).If first two 3 and 3 are equal,3+1=4 and divide it in 2+2 and you can get the faulty of 2 and repeat for the 1.

- arindamkar1981 November 17, 2010 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More