TCS
Company
suppose there are n student in a circle and teacher eliminate student in alternative manner and he eliminate students until only one is left . if he starts from 2nd position then what would be tha formula for n(integer).
Read Solution (Total 5)
-
- task is remove only even no.
i.e 2,4,6,,,,,,n.
ans=2n-1
ex.
n=7
ans=(2*1)-1,(2*2)-1,(2*3)-1,,,,,and upto (2*7)-1.
ans=1,3,5,,,,,15
hence formula is 2n-1
- 12 years agoHelpfull: Yes(4) No(1)
- ans the formula is n-1 to eliminate student until only one is left.
- 12 years agoHelpfull: Yes(1) No(0)
- our task is eliminate ..2,4,6,,,,n
so we want to remove only even no.
its( ans....2n-1}
exampal ...if 9 student in circle so ...2*1-1,2*2-1,2*3-1,2*4-1,2*5-1.....so we get ..1,3,5,7,9,.so its so[ans is 2n-1) rahul soni (khandwa) - 12 years agoHelpfull: Yes(0) No(1)
- rahul - it already mentioned in the question that they r standing in a row and from 2 we are alternatively removing until only one student will not left
for example 5 student
12345 then 1 will come if we remove 2 4 then after 4 1 will come and we will remove 5 after removing 1 and only 3 will remain there so 3 will be the answer ..
is there any perfect formula to calculate without going through lengthy process ? - 12 years agoHelpfull: Yes(0) No(1)
- sorry not in row they are in circle and rest answer and explanation is same .. but 12345 then again 1 try to make it on copy and the solve u will get what i wanna ask .
- 12 years agoHelpfull: Yes(0) No(1)
TCS Other Question