Hi Anil,The code is the tested one. We are converting binary to num, not num to binary so i/10 is right. I have spared my time and after testing i have given the codecheers,Ashish
On 6/21/06, anil kumar [EMAIL PROTECTED] wrote:
hi asish, thanks for ur reply.. But ur code takes O(n logn) to find
hi asish Googmelster,
thanks for ur reply..
sorry asish.sorry i thought in a different mannerok anyway
thanks for ur response.
Googmelster's solution is also nice.but can u try without swapping
array entries.
--~--~-~--~~~---~--~~
@anil
Buddy my proposed algo is linear one, since you do the xor operation
(d+1)n times, where d is the number of bits in N.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
Hey,
As per ATL/COM world, both means the same. GUID/UUIDs are
generated based on the N/W card MAC address. Since MAC address is
unique, so does GUID.
- Sabi-
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
i'm starting a wiki on coding, keeping everything seperate. anyone who
wants to help check out the site. i want to document every function for
every language ever
www.coderwiki.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Norbert wrote:
I'm unable to solve this problem correctly. Please help me:
You have chess board of size N x M and a lot of bricks of size K x 1.
How many bricks can you place on this board (brick edges must be
pallarel to board edges)
Thanks for help
Chessboards are always perfectly
If M = N and M = K, then the solution is
N * (M/K) + (M - M/K*K) * (N/K)
Use integer division
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
On 6/23/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
If M = N and M = K, then the solution isN * (M/K) + (M - M/K*K) * (N/K)Use integer division
This solution is not corrent.
for example, M = N = 4, K = 2
N * (M/K) + (M - M/K*K) * (N/K) = 4 * ( 4 / 2 ) + ( 4 - 4 / 2 * 2 ) * ( 4 / 2 ) = 8