Funky Phoenix
BAN USER
Comments (3)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Assuming they are in a row, as per the description of the question, we just need to find the sum of money at houses at odd positions and even positions and find greater of the two. right?
- Funky Phoenix January 20, 2011Comment hidden because of low score. Click to expand.
0
of 0 vote
n(n^2-1) = n(n-1)(n+1)
24 = 1*2*2*2*3
Out n, n-1, n+1 two are definitely even. They are divided out by two 2's in 24s.
Remaining is 6.
Out of n, n-1, n+1, one is definitely divisible by 3. That number is divided by the 3 in 24.
Now out of the two even numbers in n, n-1, n+1 one is double of one odd number, and one is definitely double of one even number.
So that number is divided out by the remaining 2. Rest remaining is 1. Thus dividable
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
ok. I get it :)
- Funky Phoenix January 20, 2011