TCS
Company
Numerical Ability
Permutation and Combination
A staircase contains 12 steps. We can climb it 1 or 2 steps. But 8th step contains a snake so we cant step on it. In how many ways can we the top? Please solve this question
Read Solution (Total 7)
-
- it is devided into 3 parts
1. 1-7 step
2. 7-9th step
3. 9-12th step
1-7th step can be reached in 21 ways i.e,,
all 1's step 1 way
(5) 1's and 1 with 2 step 6 ways in that way it is 1+6+10+4 =21 ways
7-9 th step 1 way
and 9-12 3 ways
so 21+1+3=25 ways totally - 9 years agoHelpfull: Yes(24) No(15)
- First 7 steps can be reached with
1. all 1's(all single steps)
2. 5 steps with single steps and one with 2 steps
3.3's single and 2 with 2 steps
4.1 single and 3's double
all 1's in only one way i.e.,7!/7!=1
5 with 1's and 1 two is 6!/5!=6
similerly for
3 with 1,s and 2 with 2 steps is 5!/(3!*2!)=10
similerly we have to solve
- 9 years agoHelpfull: Yes(15) No(2)
- MANJUNATH , would you plz explain how it come 10 in (1+6+10+4)..plz explain
- 9 years agoHelpfull: Yes(9) No(1)
- 105 ways.
If u want climb n steps with 1 or 2 jumps, then possible ways are = (n+1)th fibo. Number.
First 7 steps can be climbed in 21 ways.
[ since 8 th fibo. Number ].
9-12 th steps ( totally 4 steps ) can b climbed in 5 ways [ 5 th Fibo. No ].
So totally 21*5=105 ways.
- 8 years agoHelpfull: Yes(7) No(2)
- @MANJUNATH you are genius man..!!hats off..
- 9 years agoHelpfull: Yes(4) No(0)
- It is divided into 3 parts 1. 1-7 step 2. 7-9th step 3. 9-12th step
1-7th step can be reached in 21 ways i.e,,
All 1's step + Five 1's and 1 with 2 steps + Three 1’s and two 2 steps + One 1’s and three 2’steps
1 way + 6 ways + 10 + 4
In that way it is 1+6+10+4 =21 ways
7 to 9th step 1 way
All 1's step + one 1’s and one 2 steps
1 way + 2 ways
So 21 x 1 x 3 = 63 ways totally
- 8 years agoHelpfull: Yes(2) No(2)
- t is devided into 3 parts
1. 1-7 step
2. 7-9th step
3. 9-12th step
1-7th step can be reached in 21 ways i.e,,
all 1's step 1 way
(5) 1's and 1 with 2 step 6 ways in that way it is 1+6+10+4 =21 ways
7-9 th step 1 way
and 9-12 3 ways
so 21+1+3=25 ways totally - 5 years agoHelpfull: Yes(0) No(0)
TCS Other Question