anilkumarkatti
BAN USERProblem with BWWBBB:
BWWBBB can be produced both clockwise and anticlockwise. Start from 4th B and go right to left.
WBBBWBBWB
- anilkumarkatti January 05, 2011Isn't it just (((1 << (n+1)) - 1) & ~2)?
Say n = 3.
the series of numbers in ascending order is:
0111, 1011, 1101, 1110, 10011, etc..
generalizing, nth number in the series is (11..(n-1) times 01) right?
If your OS crashes due to any of these, it is not a OS after all. :/
- anilkumarkatti January 03, 2011A different thread is discussing selection algorithm for sorted matrices.
- anilkumarkatti November 24, 2010Using the observation made by Anonymous, I can think of an algorithm which basically considers the following group of elements and sorts them. The collection of these sorted elements should give us the final sorted list:
A[0][0]
A[1][0], A[0][1]
A[2][0], A[1][1], A[0][2]
and so on..
The complexity of such an algorithm will be
O( sum (i log i)) where 1 <= i <= n.
I am pretty sure that it is better than n*n log n in terms of constant terms. But, I cannot prove it. Can anyone help me?
Meeting point is common sense - they all travel with the same velocity and for same time => they all travel same distance. Also, they all meet. center is the only point inside the square which is at same distance from all the 4 corners. Similarly centroid.
- anilkumarkatti January 05, 2011Rest is math.