Re: [algogeeks] Adobe ques

2011-07-21 Thread Abhi
@piyush A small mistake though,but output of your code for 1110 00011000 0101 00110011 then output shall be 51.65.24.14 ..opposite of what should be -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the we

[algogeeks] Adobe Ques

2011-07-21 Thread Abhi
Given a string, find largest unique substring in string efficiently.. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/dOfxYROYaXEJ. To post to this group,

Re: [algogeeks] Adobe ques

2011-07-21 Thread Anika Jain
thanx all :) On Thu, Jul 21, 2011 at 2:26 PM, Piyush Sinha wrote: > > > http://www.ideone.com/4Rq51 > > > > > -- > *Piyush Sinha* > *IIIT, Allahabad* > *+91-7483122727* > * "NEVER SAY > NEVER" > * > > -- > You received this message becaus

Re: [algogeeks] Adobe ques

2011-07-21 Thread Piyush Sinha
http://www.ideone.com/4Rq51 -- *Piyush Sinha* *IIIT, Allahabad* *+91-7483122727* * "NEVER SAY NEVER" * -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send

Re: [algogeeks] Adobe ques

2011-07-21 Thread Anika Jain
sorry its 32 bit no. not 323..wrote tht by mistake On Thu, Jul 21, 2011 at 1:57 PM, Anika Jain wrote: > @piyush: lets say 323 bit integer given is the one with its binary as > 1110 00011000 0101 00110011 then output shall be 14.24.65.51 > both for little as well as big endian.. > > > On

Re: [algogeeks] Adobe ques

2011-07-21 Thread Anika Jain
@piyush: lets say 323 bit integer given is the one with its binary as 1110 00011000 0101 00110011 then output shall be 14.24.65.51 both for little as well as big endian.. On Thu, Jul 21, 2011 at 1:28 PM, sagar pareek wrote: > @anika > first divide ur 32 bits in four octets > then convert

Re: [algogeeks] Adobe ques

2011-07-21 Thread sagar pareek
@anika first divide ur 32 bits in four octets then convert them in integers and save in 4 int variables now to find us system is little or big endian:- so u can do this as:- #include union endian { int a; //assuming int to be 2 bytes char [2]; }; main() { union a ={1}; if(a.char[0]==1) p

Re: [algogeeks] Adobe ques

2011-07-20 Thread Piyush Sinha
@Anika..can u give one example?? On 7/21/11, Anika Jain wrote: > write a c code that takes a 32 bit ip address n prints it in dotted notation > as a.b.c.d. > The code shall work for big endian as well as for little endian.. > > > In this how can i make it common for big endian and little endian??

[algogeeks] Adobe ques

2011-07-20 Thread Anika Jain
write a c code that takes a 32 bit ip address n prints it in dotted notation as a.b.c.d. The code shall work for big endian as well as for little endian.. In this how can i make it common for big endian and little endian?? if in little endian my lower order 8 bits shall be d but for big endian th

Re: [algogeeks] Adobe Ques

2010-07-14 Thread Anand
main() { char arr[]="abcde"; int r = 3,i,count; int len; len = sizeof(arr)/sizeof(arr[0]); for(i=0;ihttp://codepad.org/3n1qdS2R On Wed, Jul 14, 2010 at 11:51 AM, ashita dadlani wrote: > @ashish:yours is not a generalized solution.Here you are assuming that u > know r=3. > What if we ne

Re: [algogeeks] Adobe Ques

2010-07-14 Thread ashita dadlani
@ashish:yours is not a generalized solution.Here you are assuming that u know r=3. What if we need to generalize the solution? On Wed, Jul 14, 2010 at 11:58 PM, Ashish Goel wrote: > for (int i=0;i printf("%c%c%c ", a[i],a[i+1],a[i+2]); > > > Best Regards > Ashish Goel > "Think positive and find

Re: [algogeeks] Adobe Ques

2010-07-14 Thread Ashish Goel
for (int i=0;iwrote: > Write the code to print combinations of a given array (n& r were given) e.g > for abcde .r=3 ...print " abc", "bcd' "cde" etc > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to

[algogeeks] Adobe Ques

2010-07-14 Thread ankit mahendru
Write the code to print combinations of a given array (n& r were given) e.g for abcde .r=3 ...print " abc", "bcd' "cde" etc -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To un