[algogeeks] Re: numbers

2011-02-12 Thread algoseeker
If the integers are 16 bit, then why are you not considering that the sequence would be ,0111,0010,0001,,00010111 in 1st example u gave and ,0111,0011,1110,00

[algogeeks] Re: numbers

2010-07-09 Thread Gene
You can't. You can allow an integer type variable i to identify e.g. a 16-bit short with index i % 16 and bit 1 << i. This is a very standard technique. On Jul 5, 10:15 am, Ashish Goel wrote: > i fail to understand how can you give a pointer to a bit which is not > starting at the word bounda

Re: [algogeeks] Re: numbers

2010-07-05 Thread Ashish Goel
i fail to understand how can you give a pointer to a bit which is not starting at the word boundary? Best Regards Ashish Goel "Think positive and find fuel in failure" +919985813081 +919966006652 On Mon, Jul 5, 2010 at 7:24 PM, Siddhi wrote: > i think 2 digit combination switch case can be kep

[algogeeks] Re: numbers

2010-07-05 Thread Siddhi
i think 2 digit combination switch case can be kept: e.g : there can be value between 1 to F (considered smallest 4 bit sequence) now 2, 4, 6 can never be part of coninuous sequence.. switch(combo): 1 followed by 8: valid 1 followed by 9: valid, 1 followed by 10: valid like that we make combinati

[algogeeks] Re: numbers

2010-07-04 Thread Gene
On Jul 4, 6:31 am, jalaj jaiswal wrote: > There is very long array of ints, and you are given pointer to base addr of > this array.. each int is 16bit representation... you need to return the > pointer to tht "bit" inside array where longest sequence of "1"s start > for example. if your array has