[algogeeks]

2011-09-06 Thread aayush jain
can anybody tell me the code of find the prime no. and after finding prime
no. find its prime factore using linkes list??

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] regarding tejas networks.

2011-09-06 Thread kARTHIK R
Somebody has already posted it.
Karthik R,
R&D Engineer,
Tejas Networks.



On Wed, Sep 7, 2011 at 10:15 AM, shivank goyal wrote:

> NIT Durgapur guys and other college students where tejas networks have
> visited, kindly share some  questions that Tejas Networks have asked there .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] plz xplain the o/p

2011-09-06 Thread siddharam suresh
http://www.daniweb.com/software-development/c/threads/339649
Thank you,
Sid.



On Wed, Sep 7, 2011 at 11:43 AM, siddharam suresh
 wrote:
> my mistake,
> for 2)you cant change the address of the any array,(use change it to
> char *t1="xyz",*t2="abc"; )
> i thought pstr is array of array of strings(but  is array of character
> pointer),
> @sachindraac is right
>
>  char *pstr[2] = {"Hello", "piyush"};
>
> Thank you,
> Sid.
>
>
> On Wed, Sep 7, 2011 at 11:34 AM, Shachindra A C  wrote:
>>
>> I assume you expect to see the strings interchanged. But you are not 
>> changing anything in the memory. So in main(), pstr[0] and pstr[1] contains 
>> whatever was there earlier. If you change the parameters of the swap to 
>> swap(char **,char **), pass the addresses of pstr[0] ,pstr[1] and then do 
>> whatever u r doing in swap, the strings will get exchanged.
>>
>> On Wed, Sep 7, 2011 at 11:26 AM, piyush agarwal  wrote:
>>>
>>> #include
>>> void swap(char *, char *);
>>>
>>> int main()
>>> {
>>>     char *pstr[2] = {"Hello", "piyush"};
>>>     swap(pstr[0], pstr[1]);
>>>     printf("%s\n%s", pstr[0], pstr[1]);
>>>     return 0;
>>> }
>>> void swap(char *t1, char *t2)
>>> {
>>>     char *t;
>>>     t=t1;
>>>     t1=t2;
>>>     t2=t;
>>> }
>>>
>>>
>>> --
>>> Piyush Agarwal
>>> Final Year Undergraduate
>>> Department of Computer Engineering
>>> Malaviya National Institute of Technology
>>> Jaipur
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>>
>> --
>> Regards,
>> Shachindra A C
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread Karan Thakral
check the case 63  62 46 71 28 39 43 24 36 12

You have to find 3rd largest  62

your case you will miss 62 in your first iteration


On Wed, Sep 7, 2011 at 9:41 AM, Anup Ghatage  wrote:

> Here is another one. Pardon me if it goes by some other name.
>
> Divide the array in K parts.
>
> Find the Maximum in each of these parts and store it in an array of size K.
>
> Find the Minimum in K to find the K'th max.
>
> Total Time Complexity = O ( n + k ) where  0 <= k <= n
>
> --
> Anup Ghatage
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] plz xplain the o/p

2011-09-06 Thread PRATEEK VERMA
@piyush
the output will hello piyushit's due to following reason
you've declared array of 2 pointers to character(char *pstr[2]),which means
hello and piyush are stored somewhere else but your array is having only
starting addresses of each string.now when you are calling swap
function you are passing these addresses as a copy to formal parameters t1
and t2...if you really want to see the change in main function then you have
to do call by reference.i.e. instead of sending copy of content of your
array of pointers,send the address of that location where your pointer is
stored in array of pointers(i.e. send addresses of pstr[0] and pstr[1]
instead of sending values of pstr[0] and pstr[1])...for this to
work,your function should be
swap(char** t1,char** t2){
char *t;
t=*t1;
*t1=*t2;
*t2=t;
}

if still there is problem then you need to revise concept of pointers...Let
Us C or pointer in C would help

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] plz xplain the o/p

2011-09-06 Thread siddharam suresh
my mistake,
for 2)you cant change the address of the any array,(use change it to
char *t1="xyz",*t2="abc"; )
i thought pstr is array of array of strings(but  is array of character
pointer),
@sachindraac is right

 char *pstr[2] = {"Hello", "piyush"};

Thank you,
Sid.


On Wed, Sep 7, 2011 at 11:34 AM, Shachindra A C  wrote:
>
> I assume you expect to see the strings interchanged. But you are not changing 
> anything in the memory. So in main(), pstr[0] and pstr[1] contains whatever 
> was there earlier. If you change the parameters of the swap to swap(char 
> **,char **), pass the addresses of pstr[0] ,pstr[1] and then do whatever u r 
> doing in swap, the strings will get exchanged.
>
> On Wed, Sep 7, 2011 at 11:26 AM, piyush agarwal  wrote:
>>
>> #include
>> void swap(char *, char *);
>>
>> int main()
>> {
>> char *pstr[2] = {"Hello", "piyush"};
>> swap(pstr[0], pstr[1]);
>> printf("%s\n%s", pstr[0], pstr[1]);
>> return 0;
>> }
>> void swap(char *t1, char *t2)
>> {
>> char *t;
>> t=t1;
>> t1=t2;
>> t2=t;
>> }
>>
>>
>> --
>> Piyush Agarwal
>> Final Year Undergraduate
>> Department of Computer Engineering
>> Malaviya National Institute of Technology
>> Jaipur
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/algogeeks?hl=en.
>
>
>
> --
> Regards,
> Shachindra A C
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to 
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/algogeeks?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] plz xplain the o/p

2011-09-06 Thread Shachindra A C
I assume you expect to see the strings interchanged. But you are not
changing anything in the memory. So in main(), pstr[0] and pstr[1] contains
whatever was there earlier. If you change the parameters of the swap to
swap(char **,char **), pass the addresses of pstr[0] ,pstr[1] and then do
whatever u r doing in swap, the strings will get exchanged.

On Wed, Sep 7, 2011 at 11:26 AM, piyush agarwal  wrote:

> #includevoid swap(char *, char *);
> int main()
> {
> char *pstr[2] = {"Hello", "piyush"};
> swap(pstr[0], pstr[1]);
> printf("%s\n%s", pstr[0], pstr[1]);
> return 0;
> }void swap(char *t1, char *t2)
> {
> char *t;
> t=t1;
> t1=t2;
> t2=t;
> }
>
>
>
> --
> Piyush Agarwal
> Final Year Undergraduate
> Department of Computer Engineering
> Malaviya National Institute of Technology
> Jaipur
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards,
Shachindra A C

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] plz xplain the o/p

2011-09-06 Thread siddharam suresh
as per my knowledge
1)this is not swapping of the strings, use double indirection (use swap
function swap(char **t1, char **t2))
2)you cant change the address of the any array,(use change it to char
*t1="xyz",*t2="abc"; )

Thank you,
Sid.



On Wed, Sep 7, 2011 at 11:26 AM, piyush agarwal  wrote:

> #includevoid swap(char *, char *);
> int main()
> {
> char *pstr[2] = {"Hello", "piyush"};
> swap(pstr[0], pstr[1]);
> printf("%s\n%s", pstr[0], pstr[1]);
> return 0;
> }void swap(char *t1, char *t2)
> {
> char *t;
> t=t1;
> t1=t2;
> t2=t;
> }
>
>
>
> --
> Piyush Agarwal
> Final Year Undergraduate
> Department of Computer Engineering
> Malaviya National Institute of Technology
> Jaipur
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] plz xplain the o/p

2011-09-06 Thread piyush agarwal
#includevoid swap(char *, char *);
int main()
{
char *pstr[2] = {"Hello", "piyush"};
swap(pstr[0], pstr[1]);
printf("%s\n%s", pstr[0], pstr[1]);
return 0;
}void swap(char *t1, char *t2)
{
char *t;
t=t1;
t1=t2;
t2=t;
}



-- 
Piyush Agarwal
Final Year Undergraduate
Department of Computer Engineering
Malaviya National Institute of Technology
Jaipur

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread Brijesh


On Wednesday, 7 September 2011 09:41:53 UTC+5:30, Anup wrote:
>
> Here is another one. Pardon me if it goes by some other name.
>
> Divide the array in K parts.
>
> Find the Maximum in each of these parts and store it in an array of size K.
>
> Find the Minimum in K to find the K'th max.
>
> Total Time Complexity = O ( n + k ) where  0 <= k <= n 
>
 

>
> -- 
> Anup Ghatage
>

-- 
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/-/zg3SeePrmzYJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Indus Valley Recruitment

2011-09-06 Thread Khyati Gupta
Indus valley has been postponed or not ..anybody has got any information
from their college authorities regarding this somebody from IP please
confirm ???

On Mon, Sep 5, 2011 at 11:41 PM, prasanna  wrote:

> wch college?
> and whats the package??
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Khyati Gupta

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] regarding tejas networks.

2011-09-06 Thread shivank goyal
NIT Durgapur guys and other college students where tejas networks have
visited, kindly share some  questions that Tejas Networks have asked there .

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re:

2011-09-06 Thread yamini gupta
i think the output is return type of main();

On Sep 7, 9:19 am, rahul vatsa  wrote:
> the expression to sizeof is analyzed @compile time to determine its type.
> so, when u do sizeof(main()) in main( ), it doesn't call main again, it just
> gets the type of the function.
> if you declare main as  void main( ) o/p will be 1
> if its int main( ) o/p 4
>
> if you just write main in an expression, usually it implicitly converts to
> corresponding function pointer, but in case of being argument of sizeof,
> compiler doesn't do this conversion. so
> sizeof(main) will also be 1 or 4 depending on the prototype of main.
>
>
>
>
>
>
>
> On Tue, Sep 6, 2011 at 11:25 PM, rahul vatsa  wrote:
> >  sizeof(void)  ->  1
>
> > void is a datatype, though u cant create obj of void type, then also it hs
> > to hs a size, so it hs been given the minimal sz i.e 1.
>
> > On Tue, Sep 6, 2011 at 3:13 PM, Kunal Patil  wrote:
>
> >> @siddharam suresh: sizeof(void) is an prohibited operation. So your code
> >> would result in compile time error.
>
> >> On Tue, Sep 6, 2011 at 11:47 PM, siddharam suresh <
> >> siddharam@gmail.com> wrote:
>
> >>> my guess,
> >>> sizeof() takes only the declaration properties not the definition
> >>> properties(that means it wont call the function)
>
> >>> *#include*
> >>> *void c(); *
> >>> *int main()*
> >>> *{*
> >>> *printf("%d",sizeof(c()));*
> >>> *}*
> >>> *void c()*
> >>> *{*
> >>> *printf("c"); *
> >>> *}*
> >>> *o/p:*
> >>> *1*
>
> >>> Thank you,
> >>> Sid.
>
> >>> On Tue, Sep 6, 2011 at 11:41 PM, siddharam suresh <
> >>> siddharam@gmail.com> wrote:
>
>  its size of return type, but why the above program not showing
>  segmentation fault?
>  Thank you,
>  Sid.
>
>  On Tue, Sep 6, 2011 at 11:34 PM, ankush garg wrote:
>
> > better contact AKSHAY CHADHA .. the person is quite good at c and
> > algos currently placed in MICROSOFT..
> > akshay.chadha...@gmail.com
> > 9899466888
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.
>
> >>>  --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Algorithm Geeks" group.
> >>> To post to this group, send email to algogeeks@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> algogeeks+unsubscr...@googlegroups.com.
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/algogeeks?hl=en.
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "Algorithm Geeks" group.
> >> To post to this group, send email to algogeeks@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> algogeeks+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/algogeeks?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-09-06 Thread rahul vatsa
the expression to sizeof is analyzed @compile time to determine its type.
so, when u do sizeof(main()) in main( ), it doesn't call main again, it just
gets the type of the function.
if you declare main as  void main( ) o/p will be 1
if its int main( ) o/p 4

if you just write main in an expression, usually it implicitly converts to
corresponding function pointer, but in case of being argument of sizeof,
compiler doesn't do this conversion. so
sizeof(main) will also be 1 or 4 depending on the prototype of main.







On Tue, Sep 6, 2011 at 11:25 PM, rahul vatsa  wrote:

>  sizeof(void)  ->  1
>
> void is a datatype, though u cant create obj of void type, then also it hs
> to hs a size, so it hs been given the minimal sz i.e 1.
>
>
>
>
> On Tue, Sep 6, 2011 at 3:13 PM, Kunal Patil  wrote:
>
>> @siddharam suresh: sizeof(void) is an prohibited operation. So your code
>> would result in compile time error.
>>
>>
>> On Tue, Sep 6, 2011 at 11:47 PM, siddharam suresh <
>> siddharam@gmail.com> wrote:
>>
>>> my guess,
>>> sizeof() takes only the declaration properties not the definition
>>> properties(that means it wont call the function)
>>>
>>>
>>> *#include*
>>> *void c(); *
>>> *int main()*
>>> *{*
>>> *printf("%d",sizeof(c()));*
>>> *}*
>>> *void c()*
>>> *{*
>>> *printf("c"); *
>>> *}*
>>> *o/p:*
>>> *1*
>>>
>>>
>>> Thank you,
>>> Sid.
>>>
>>>
>>>
>>> On Tue, Sep 6, 2011 at 11:41 PM, siddharam suresh <
>>> siddharam@gmail.com> wrote:
>>>
 its size of return type, but why the above program not showing
 segmentation fault?
 Thank you,
 Sid.



 On Tue, Sep 6, 2011 at 11:34 PM, ankush garg wrote:

> better contact AKSHAY CHADHA .. the person is quite good at c and
> algos currently placed in MICROSOFT..
> akshay.chadha...@gmail.com
> 9899466888
>
> --
> You received this message because you are subscribed to the Google
> Groups "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread Anup Ghatage
Here is another one. Pardon me if it goes by some other name.

Divide the array in K parts.

Find the Maximum in each of these parts and store it in an array of size K.

Find the Minimum in K to find the K'th max.

Total Time Complexity = O ( n + k ) where  0 <= k <= n

-- 
Anup Ghatage

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] EOF

2011-09-06 Thread Anup Ghatage
You can quite easily map this problem to that of a typical client-server
protocol.
You don't know the size of the data, and the all packets will be of a
certain size, possibly, except the last one.

So the solutions provided for that problem might apply to some cases of
this!

-- 
Anup Ghatage

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Maximum possible edges in a graph

2011-09-06 Thread Shuaib
Actually it is a bipartite graph. Thus answer equal to floor(n/2)*ceil(n/2).

--
Shuaib
http://twitter.com/ShuaibKhan
http://www.bytehood.com/

On 07-Sep-2011, at 7:30 AM, Shuaib Khan  wrote:

> I don't have a formal proof yet, but can anyone give a counter test case to 
> following:
> 
> Let f(n) be our function:
>   if n is even: f(n) = (n^2)/4
>   else: f(n) = ((n-1)^2)/4 + (n-1)/2 
> 
> On Wed, Sep 7, 2011 at 5:36 AM, Shuaib Khan  wrote:
> What is the maximum number of edges possible in a graph with N nodes, and 
> where any three nodes can have at most two edges between them. 1<=N<=10.
> 
> 
> -- 
> Shuaib
> 
> 
> 
> 
> -- 
> Shuaib
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] SPOJ

2011-09-06 Thread Akshata Sharma
@rahul, yes i agree with what you said, but I don't think that this is
causing WA here.. Its equivalent as if u take 2 1-darrays.. right?

On Wed, Sep 7, 2011 at 8:25 AM, rahul vatsa  wrote:

> if you are allocating memory for a n-d array, u shouldn't allocate memory
> for each row separately, wen u do that u get separate chunk of memory for
> each row, nd it breaks the basic rule of an array (i.e. array elements
> should be in contigious memory locations).
>
>
> On Tue, Sep 6, 2011 at 2:31 PM, Akshata Sharma 
> wrote:
>
>> I am getting WA in this problem, I am not getting what i am doing wrong
>> .
>> http://www.spoj.pl/problems/AE2A/
>>
>> My dp is:
>> dp[n][k] = (dp[n - 1][k - 1] + dp[n - 1][k - 2] + dp[n - 1][k - 3] + dp[n
>> - 1][k - 4] + dp[n - 1][k - 5] + dp[n - 1][k - 6])
>>
>> and my code:
>> #include
>>
>> using namespace std;
>>
>> int solve(int n, int k)
>> {
>>  int** dp;
>>  dp = (int **)malloc(2*sizeof(int*));
>>  dp[0]=(int*)malloc(111*sizeof(int));
>>  dp[1]=(int*)malloc(111*sizeof(int));
>>
>>  for(int i=1;i<=6;i++)
>>  dp[0][i]=1;
>>  int throws=n;
>>  n--;
>>  int sum=0;
>>  while(n--)
>>  {
>>   for(int i=1;i<=k;i++)
>>   {
>> dp[1][i]=0;
>> sum=0;
>> for(int j=1;j<=6;j++)
>> {
>>  if((i-j)<0) break;
>>  sum+=dp[0][i-j];
>> }
>>dp[1][i]=sum;
>>   }
>>   for(int i=1;i<=k;i++)
>>dp[0][i]=dp[1][i];
>>  }
>>
>>  dp[0][k]*=100;
>>  for(int i=0;i>   dp[0][k]/=6;
>>  return dp[0][k];
>> }
>>
>> int main()
>> {
>>  int cases;
>>  cin>>cases;
>>  while(cases--)
>>  {
>>   long n,k;
>>   cin>>n>>k;
>>   cout<>  }
>>  return 0;
>> }
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] size of

2011-09-06 Thread rahul vatsa
bcoz void is a datatype, though u cant create obj of void type, then also it
hs to hs a size, so it hs been given the minimal sz i.e 1

On Tue, Sep 6, 2011 at 5:11 PM, UTKARSH SRIVASTAV
wrote:

> why sizeof(vod) is giving ans 1 not error?
>
> --
> *UTKARSH SRIVASTAV
> CSE-3
> B-Tech 3rd Year
> @MNNIT ALLAHABAD*
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-09-06 Thread rahul vatsa
 sizeof(void)  ->  1

void is a datatype, though u cant create obj of void type, then also it hs
to hs a size, so it hs been given the minimal sz i.e 1.



On Tue, Sep 6, 2011 at 3:13 PM, Kunal Patil  wrote:

> @siddharam suresh: sizeof(void) is an prohibited operation. So your code
> would result in compile time error.
>
>
> On Tue, Sep 6, 2011 at 11:47 PM, siddharam suresh  > wrote:
>
>> my guess,
>> sizeof() takes only the declaration properties not the definition
>> properties(that means it wont call the function)
>>
>>
>> *#include*
>> *void c(); *
>> *int main()*
>> *{*
>> *printf("%d",sizeof(c()));*
>> *}*
>> *void c()*
>> *{*
>> *printf("c"); *
>> *}*
>> *o/p:*
>> *1*
>>
>>
>> Thank you,
>> Sid.
>>
>>
>>
>> On Tue, Sep 6, 2011 at 11:41 PM, siddharam suresh <
>> siddharam@gmail.com> wrote:
>>
>>> its size of return type, but why the above program not showing
>>> segmentation fault?
>>> Thank you,
>>> Sid.
>>>
>>>
>>>
>>> On Tue, Sep 6, 2011 at 11:34 PM, ankush garg  wrote:
>>>
 better contact AKSHAY CHADHA .. the person is quite good at c and
 algos currently placed in MICROSOFT..
 akshay.chadha...@gmail.com
 9899466888

 --
 You received this message because you are subscribed to the Google
 Groups "Algorithm Geeks" group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] stack implementation with a constraint

2011-09-06 Thread *$*
HI,
 Need logic to implement a stack which should support push , pop , top as
well as mostFrequent. mostFrequent should return the most frequently pushed
element.

I have provided the following logic
have one general stack implementation and one Heap .. (Heapify based on
frequeny not based on element value)

can any one tell me the time complexity for the above logic .. as well as
any other good algo for the same.

Thx,
--Gopi

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Microsoft written!!!

2011-09-06 Thread Vikram Singh
i m asking again, cos no one replied earlier:

in example given by mohit... is the leftmost right cousin of 8 and 9,
NULL or
12??


On Aug 27, 6:42 pm, aditi garg  wrote:
> This grp is full of MS interview ques..search the archives...
>
> On Sat, Aug 27, 2011 at 6:55 PM, teja bala wrote:
>
>
>
> > if any one aware of microsoft written test please give me the suggestions
> > and respective links
> > thx.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: size of

2011-09-06 Thread rahul vatsa
bcoz  its a macro for a pointer, a null pointer const.

On Tue, Sep 6, 2011 at 5:14 PM, UTKARSH SRIVASTAV
wrote:

> and why sizeof(NULL) is giving 4 any ans?
>
>
>
>
>
>> --
>> *UTKARSH SRIVASTAV
>> CSE-3
>> B-Tech 3rd Year
>> @MNNIT ALLAHABAD*
>>
>>
>>
>
>
>
> --
> *UTKARSH SRIVASTAV
> CSE-3
> B-Tech 3rd Year
> @MNNIT ALLAHABAD*
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] SPOJ

2011-09-06 Thread rahul vatsa
if you are allocating memory for a n-d array, u shouldn't allocate memory
for each row separately, wen u do that u get separate chunk of memory for
each row, nd it breaks the basic rule of an array (i.e. array elements
should be in contigious memory locations).


On Tue, Sep 6, 2011 at 2:31 PM, Akshata Sharma wrote:

> I am getting WA in this problem, I am not getting what i am doing wrong
> .
> http://www.spoj.pl/problems/AE2A/
>
> My dp is:
> dp[n][k] = (dp[n - 1][k - 1] + dp[n - 1][k - 2] + dp[n - 1][k - 3] + dp[n -
> 1][k - 4] + dp[n - 1][k - 5] + dp[n - 1][k - 6])
>
> and my code:
> #include
>
> using namespace std;
>
> int solve(int n, int k)
> {
>  int** dp;
>  dp = (int **)malloc(2*sizeof(int*));
>  dp[0]=(int*)malloc(111*sizeof(int));
>  dp[1]=(int*)malloc(111*sizeof(int));
>
>  for(int i=1;i<=6;i++)
>  dp[0][i]=1;
>  int throws=n;
>  n--;
>  int sum=0;
>  while(n--)
>  {
>   for(int i=1;i<=k;i++)
>   {
> dp[1][i]=0;
> sum=0;
> for(int j=1;j<=6;j++)
> {
>  if((i-j)<0) break;
>  sum+=dp[0][i-j];
> }
>dp[1][i]=sum;
>   }
>   for(int i=1;i<=k;i++)
>dp[0][i]=dp[1][i];
>  }
>
>  dp[0][k]*=100;
>  for(int i=0;i   dp[0][k]/=6;
>  return dp[0][k];
> }
>
> int main()
> {
>  int cases;
>  cin>>cases;
>  while(cases--)
>  {
>   long n,k;
>   cin>>n>>k;
>   cout<  }
>  return 0;
> }
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] IP Address

2011-09-06 Thread Anup Ghatage
I think It depends on the IP version you willbe using.

If it is IPv4 then it is:
struct in_addr and struct sockaddr_in

If it is IPv6 then it is:
struct in6_addr and struct sockaddr_in6

Also there is a struct sockaddr_storage for generic storage and
interconversion of IP address' if you don't know which version it is.

On Tue, Sep 6, 2011 at 1:51 PM, sagar pareek  wrote:

> @ r_shetty
>
> search
> 1. struct in_addr
> 2. struct sockaddr_in
>
>
> On Mon, Sep 5, 2011 at 10:04 PM, teja bala wrote:
>
>> resource records which is a 5
>> tuple(domain_name,type,value,class,time_to_live) is returned to respective
>> browser request when a resolver gets called..
>>
>>
>> On Mon, Sep 5, 2011 at 9:46 PM, rShetty  wrote:
>>
>>> Which is the data Structure used to store the IP addresses in a
>>> network ?
>>> Please Elaborate?
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> **Regards
> SAGAR PAREEK
> COMPUTER SCIENCE AND ENGINEERING
> NIT ALLAHABAD
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Anup Ghatage

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Maximum possible edges in a graph

2011-09-06 Thread Shuaib Khan
I don't have a formal proof yet, but can anyone give a counter test case to
following:

Let f(n) be our function:
if n is even: f(n) = (n^2)/4
else: f(n) = ((n-1)^2)/4 + (n-1)/2

On Wed, Sep 7, 2011 at 5:36 AM, Shuaib Khan  wrote:

> What is the maximum number of edges possible in a graph with N nodes, and
> where any three nodes can have at most two edges between them. 1<=N<=10.
>
>
> --
> Shuaib
>
>


-- 
Shuaib

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Maximum possible edges in a graph

2011-09-06 Thread Shuaib Khan
What is the maximum number of edges possible in a graph with N nodes, and
where any three nodes can have at most two edges between them. 1<=N<=10.


-- 
Shuaib

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: c output .. help plz

2011-09-06 Thread Dave
@Srivastav: Yeah. You need more parens:

printf("%d",(int)(3.14*6.25*6.25));

Without the extra parens, the 3.14 is cast to an int, but then
implicitly recast to a double for the multiplications. With the
parens, the product is formed in type double, and then the result is
cast into integer.

Sorry for not recognizing the need before.

Dave

On Sep 6, 5:18 pm, UTKARSH SRIVASTAV  wrote:
> printf behaves abnormally when it sees arguments not matching with its
> datatype
> @dave
> printf("%d",(int)3.14*6.25*6.25); is also giving 0.
>
> --
> *UTKARSH SRIVASTAV
> CSE-3
> B-Tech 3rd Year
> @MNNIT ALLAHABAD*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread UTKARSH SRIVASTAV
find by sing median of median methods



-- 
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: c output .. help plz

2011-09-06 Thread UTKARSH SRIVASTAV
printf behaves abnormally when it sees arguments not matching with its
datatype
@dave
printf("%d",(int)3.14*6.25*6.25); is also giving 0.

-- 
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread Dave
@Piyush: You are correct, but the more complicated median-of-median
algorithms can find the kth order statistic in O(n), independent of k.
Thus, the median, which is the n/2th order statistic, can be found in
O(n), whereas the heap algorithm will find the median in O(n log n).

Dave

On Sep 6, 12:45 pm, Piyush Grover  wrote:
> this can be done using heap tree data structure.
>
> -create a max heap tree of first k elements (for finding kth min)
>  -keep on adding elements in the heap
> if the root element is greater than the current element, remove root element
> and insert the current element in the tree
> once done with n elements
> the root element will give the kth min element.
> Time complexity: O(nlogk)
> This method is very much effective for k << n (when k is a constant)
>
> Same can be done for kth max.
>
>
>
> On Tue, Sep 6, 2011 at 9:00 PM, Shravan Kumar  wrote:
>
> >http://jonah.cs.elon.edu/sduvall2/courses/csc331/2006spring/Lectures/...
>
> > On Tue, Sep 6, 2011 at 7:53 PM, yamini gupta 
> > wrote:
>
> >> partition the array using quick sort
> >> and find the kth smallest or largest number
>
> >> On Sep 6, 12:20 am, learner  wrote:
> >> > @Dave,All So Can Anyone Provide The Working Code in Linear Time for
> >> > the same ?
>
> >> > Thanks
>
> >> > On Sep 5, 6:41 pm, Dave  wrote:
>
> >> > > @Sachin: Correct: in one quicksort pivoting pass, the array is
> >> > > rearranged so that the pivot element is put in the correct spot, with
> >> > > larger elements on the right and smaller ones on the left. Now, if the
> >> > > pivot, a[p], is at location k, i.e. p = k, then you are done. If not,
> >> > > do another quicksort on the correct side of p; i.e., either on a[0] to
> >> > > a[p-1] or on a[p+1] to a[n-1], depending on whether k is less than p
> >> > > or greater than p.
>
> >> > > Dave
>
> >> > > On Sep 5, 1:27 am, sachin goyal  wrote:
>
> >> > > > PLEASE TELL ME HOW WE CAN USE QUICK SORT TO FIND THE ELEMENT
> >> > > > BECAUSE IN QUICK SORT ONE ELEMENT IN SHIFT IN ITS RIGHT POSITION ALL
> >> LEFTS
> >> > > > ARE SMALLER AND ALL RIGHT ARE BIG
>
> >> > > > On Mon, Sep 5, 2011 at  POSIT11:55 AM, sachin goyal
> >> > > > wrote:
>
> >> > > > > PLEASE TELL HOW
>
> >> > > > > On Sun, Sep 4, 2011 at 7:23 PM, sarath prasath <
> >> prasathsar...@gmail.com>wrote:
>
> >> > > > >> another sol which i learned from my friend is
> >> > > > >> think of heap sort...
>
> >> > > > >> On Sun, Sep 4, 2011 at 6:28 PM, learner <
> >> nimish7andr...@gmail.com> wrote:
>
> >> > > > >>> something I Know using quick sort randomization function we can
> >> find
> >> > > > >>> kt smallest/largest in unsorted array , but i am not able to
> >> write
> >> > > > >>> code , please help me in this and provide the code for the
> >> same.?
>
> >> > > > >>> Thanks
> >> > > > >>> Nimish K.
> >> > > > >>> 1st Year
> >> > > > >>> IITR
>
> >> > > > >>> --
> >> > > > >>> You received this message because you are subscribed to the
> >> Google Groups
> >> > > > >>> "Algorithm Geeks" group.
> >> > > > >>> To post to this group, send email to algogeeks@googlegroups.com
> >> .
> >> > > > >>> To unsubscribe from this group, send email to
> >> > > > >>> algogeeks+unsubscr...@googlegroups.com.
> >> > > > >>> For more options, visit this group at
> >> > > > >>>http://groups.google.com/group/algogeeks?hl=en.
>
> >> > > > >>  --
> >> > > > >> You received this message because you are subscribed to the
> >> Google Groups
> >> > > > >> "Algorithm Geeks" group.
> >> > > > >> To post to this group, send email to algogeeks@googlegroups.com.
> >> > > > >> To unsubscribe from this group, send email to
> >> > > > >> algogeeks+unsubscr...@googlegroups.com.
> >> > > > >> For more options, visit this group at
> >> > > > >>http://groups.google.com/group/algogeeks?hl=en.-Hidequotedtext -
>
> >> > > > - Show quoted text -
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Algorithm Geeks" group.
> >> To post to this group, send email to algogeeks@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> algogeeks+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/algogeeks?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: c output .. help plz

2011-09-06 Thread Dave
@Sisavknesh: The product of those integers is 122.65625, which is 122
and 21/32. It turns out that the low order 42 bits of the mantissa are
zero. Since numbers on PCs are stored little-endian, and because you
asked for an integer format conversion, the first 32 of those 42 bits
are treated as an integer 0 and are printed as zero.

The reason that no type conversion took place is that type conversions
are not implicit in printf (it is your responsibility to make the
format specifier and the data compatible), and you didn't ask for one,
as in:

printf("%d",(int)3.14*6.25*6.25);

Dave

On Sep 6, 11:25 am, sivaviknesh s  wrote:
>  printf("%d",3.14*6.25*6.25);
>
> ...ans : 0 ..how and why?? why not type conversion take place??
>
> --
> Regards,
> $iva

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] SPOJ

2011-09-06 Thread Gaurav Menghani
Description of the problem and your solution could help others.

On Wed, Sep 7, 2011 at 12:01 AM, Akshata Sharma
 wrote:
> I am getting WA in this problem, I am not getting what i am doing wrong
> .
> http://www.spoj.pl/problems/AE2A/
> My dp is:
> dp[n][k] = (dp[n - 1][k - 1] + dp[n - 1][k - 2] + dp[n - 1][k - 3] + dp[n -
> 1][k - 4] + dp[n - 1][k - 5] + dp[n - 1][k - 6])
> and my code:
> #include
> using namespace std;
> int solve(int n, int k)
> {
>  int** dp;
>  dp = (int **)malloc(2*sizeof(int*));
>  dp[0]=(int*)malloc(111*sizeof(int));
>  dp[1]=(int*)malloc(111*sizeof(int));
>
>  for(int i=1;i<=6;i++)
>  dp[0][i]=1;
>  int throws=n;
>  n--;
>  int sum=0;
>  while(n--)
>  {
>   for(int i=1;i<=k;i++)
>   {
>     dp[1][i]=0;
>     sum=0;
>     for(int j=1;j<=6;j++)
>     {
>      if((i-j)<0) break;
>      sum+=dp[0][i-j];
>     }
>    dp[1][i]=sum;
>   }
>   for(int i=1;i<=k;i++)
>    dp[0][i]=dp[1][i];
>  }
>  dp[0][k]*=100;
>  for(int i=0;i   dp[0][k]/=6;
>  return dp[0][k];
> }
> int main()
> {
>  int cases;
>  cin>>cases;
>  while(cases--)
>  {
>   long n,k;
>   cin>>n>>k;
>   cout<  }
>  return 0;
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Gaurav Menghani

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: size of

2011-09-06 Thread UTKARSH SRIVASTAV
and why sizeof(NULL) is giving 4 any ans?




> --
> *UTKARSH SRIVASTAV
> CSE-3
> B-Tech 3rd Year
> @MNNIT ALLAHABAD*
>
>
>



-- 
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] size of

2011-09-06 Thread UTKARSH SRIVASTAV
why sizeof(vod) is giving ans 1 not error?

-- 
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-09-06 Thread UTKARSH SRIVASTAV
sizeof(void) s not giving error...

On Tue, Sep 6, 2011 at 12:13 PM, Kunal Patil  wrote:

> @siddharam suresh: sizeof(void) is an prohibited operation. So your code
> would result in compile time error.
>
>
> On Tue, Sep 6, 2011 at 11:47 PM, siddharam suresh  > wrote:
>
>> my guess,
>> sizeof() takes only the declaration properties not the definition
>> properties(that means it wont call the function)
>>
>>
>> *#include*
>> *void c(); *
>> *int main()*
>> *{*
>> *printf("%d",sizeof(c()));*
>> *}*
>> *void c()*
>> *{*
>> *printf("c"); *
>> *}*
>> *o/p:*
>> *1*
>>
>>
>> Thank you,
>> Sid.
>>
>>
>>
>> On Tue, Sep 6, 2011 at 11:41 PM, siddharam suresh <
>> siddharam@gmail.com> wrote:
>>
>>> its size of return type, but why the above program not showing
>>> segmentation fault?
>>> Thank you,
>>> Sid.
>>>
>>>
>>>
>>> On Tue, Sep 6, 2011 at 11:34 PM, ankush garg  wrote:
>>>
 better contact AKSHAY CHADHA .. the person is quite good at c and
 algos currently placed in MICROSOFT..
 akshay.chadha...@gmail.com
 9899466888

 --
 You received this message because you are subscribed to the Google
 Groups "Algorithm Geeks" group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: convert a word into a palindrome with minimum addition of letters to it

2011-09-06 Thread Victor Manuel Grijalva Altamirano
Try with DP, a little modicated of Edit Distance algorithm

State i=the begin of the word , j=the end of the word

DP[i][j]=   0   if i==j
   0  if(i+1)==j  && word[i]==word[j]
   1  if(i+1)==j  && word[i]!=word[j]
min(DP[i+1][j]+1,DP[i][j-1]+1)   otherwise
If you have any question ask!!!
Good luck!!!




Victor Manuel Grijalva Altamirano
Universidad Tecnologica de La Mixteca

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: sap labs

2011-09-06 Thread htross
its an online test which consusts of
1.logical ability
2.database concepts
3 algorithms
4 aptitude
On
Sep 6, 9:31 pm, siva viknesh  wrote:
> hi
>    anybody who attended plz share interview experiences and also
> written test ques

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: convert a word into a palindrome with minimum addition of letters to it

2011-09-06 Thread Brijesh
This can be solve by considering following case: 
i) If all the letters in the word are distinct :  Just concatenate,  reverse 
of the string(excluding last letter) to the original word..e.g. ZXKH==>>ZXKH
KXZ

ii)If two letters are same in the word : First ignore all the letters 
between those same words , and make left sub-string and right sub-string of 
those *same letters* equal by adding letters.. e.g rzLkhmLty===>> rzyt
LkhmLtyzr   And then apply rule i) for middle letters. e.g.  rzytLkhmLtyzr 
===>> rzytLkhmhkLtyzr 

iii)If there are more than a *set of same letters* then first consider the 
farthest set and make it palindrome using rule ii) , e.g. 
ilOtPuyPuOer===>>ilreOtPuyPuOerli   and move to next pair of same 
letters i.e. P,P..(use recursion) and ignore last modified position of same 
letters i.e. 
O,O and again apply rule ii) e.g. ilreOtPuyPuOerli===>>>ilreOtuPuyPutOerli 
  And then finally use rule no i) for distinct 
words..e.g.ilreOtuPuyPutOerli===>>ilreOtuPuyuPutOerli  



On Sunday, 4 September 2011 19:54:35 UTC+5:30, learner wrote:
>
> Given a word, convert it into a palindrome with minimum addition of 
> letters to it. letters can be added anywhere in the word. for eg if 
> yahoo is given result shud be yahohay. 
>
>
> Thanks 
>
>

-- 
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/-/Hsd6Tohi95oJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Linkedlist problem

2011-09-06 Thread Don
You can't delete the last node from a singly linked list if all you
have is a pointer to that node. The previous node has a pointer to the
deleted node, and there is no way for you to get there to set it to
NULL.
Sometimes this is addressed by having a "deleted" flag in each node.
If you set that flag, the list accessors can skip over that node when
traversing the list. The list can later be cleaned up and deleted
nodes removed.
Don

On Sep 5, 6:59 am, "$hr! k@nth"  wrote:
> Hi guyz,
>
> *Given only a pointer to a node to be deleted in a singly linked list, how
> do you delete it?*
>
> if that node is in between the list, we can copy the data from next node
> into this node and we can delete the next node.
> what if the node to be deleted is last node ??
> if the list is circular linked list, does it make any difference??
>
> --
> Regards,
> $hr!k@nth

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-09-06 Thread Kunal Patil
@siddharam suresh: sizeof(void) is an prohibited operation. So your code
would result in compile time error.

On Tue, Sep 6, 2011 at 11:47 PM, siddharam suresh
wrote:

> my guess,
> sizeof() takes only the declaration properties not the definition
> properties(that means it wont call the function)
>
>
> *#include*
> *void c(); *
> *int main()*
> *{*
> *printf("%d",sizeof(c()));*
> *}*
> *void c()*
> *{*
> *printf("c"); *
> *}*
> *o/p:*
> *1*
>
>
> Thank you,
> Sid.
>
>
>
> On Tue, Sep 6, 2011 at 11:41 PM, siddharam suresh  > wrote:
>
>> its size of return type, but why the above program not showing
>> segmentation fault?
>> Thank you,
>> Sid.
>>
>>
>>
>> On Tue, Sep 6, 2011 at 11:34 PM, ankush garg  wrote:
>>
>>> better contact AKSHAY CHADHA .. the person is quite good at c and
>>> algos currently placed in MICROSOFT..
>>> akshay.chadha...@gmail.com
>>> 9899466888
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] EOF

2011-09-06 Thread Kunal Patil
If I understand question correctly, then just read as many characters as you
can using standard string functions. (like fgets n all related)
Output these all characters in a file.
Iterate until you have read all the characters and go on appending what you
have read to file.
You intended to ask something else?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Linkedlist problem

2011-09-06 Thread Arun prasath
if(nodeptr) {


 }

On Mon, Sep 5, 2011 at 5:29 PM, $hr! k@nth  wrote:

> Hi guyz,
>
> *Given only a pointer to a node to be deleted in a singly linked list, how
> do you delete it?*
>
> if that node is in between the list, we can copy the data from next node
> into this node and we can delete the next node.
> what if the node to be deleted is last node ??
> if the list is circular linked list, does it make any difference??
>
> --
> Regards,
> $hr!k@nth
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] SPOJ

2011-09-06 Thread Akshata Sharma
I am getting WA in this problem, I am not getting what i am doing wrong
.
http://www.spoj.pl/problems/AE2A/

My dp is:
dp[n][k] = (dp[n - 1][k - 1] + dp[n - 1][k - 2] + dp[n - 1][k - 3] + dp[n -
1][k - 4] + dp[n - 1][k - 5] + dp[n - 1][k - 6])

and my code:
#include

using namespace std;

int solve(int n, int k)
{
 int** dp;
 dp = (int **)malloc(2*sizeof(int*));
 dp[0]=(int*)malloc(111*sizeof(int));
 dp[1]=(int*)malloc(111*sizeof(int));

 for(int i=1;i<=6;i++)
 dp[0][i]=1;
 int throws=n;
 n--;
 int sum=0;
 while(n--)
 {
  for(int i=1;i<=k;i++)
  {
dp[1][i]=0;
sum=0;
for(int j=1;j<=6;j++)
{
 if((i-j)<0) break;
 sum+=dp[0][i-j];
}
   dp[1][i]=sum;
  }
  for(int i=1;i<=k;i++)
   dp[0][i]=dp[1][i];
 }

 dp[0][k]*=100;
 for(int i=0;i>cases;
 while(cases--)
 {
  long n,k;
  cin>>n>>k;
  cout

[algogeeks] EOF

2011-09-06 Thread Anurag Gupta
how to read a string whose length is not known
and string is so long that we can't read it all at once?

input (i.e string) is terminated by EOF

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-09-06 Thread siddharam suresh
my guess,
sizeof() takes only the declaration properties not the definition
properties(that means it wont call the function)


*#include*
*void c(); *
*int main()*
*{*
*printf("%d",sizeof(c()));*
*}*
*void c()*
*{*
*printf("c"); *
*}*
*o/p:*
*1*


Thank you,
Sid.



On Tue, Sep 6, 2011 at 11:41 PM, siddharam suresh
wrote:

> its size of return type, but why the above program not showing segmentation
> fault?
> Thank you,
> Sid.
>
>
>
> On Tue, Sep 6, 2011 at 11:34 PM, ankush garg  wrote:
>
>> better contact AKSHAY CHADHA .. the person is quite good at c and
>> algos currently placed in MICROSOFT..
>> akshay.chadha...@gmail.com
>> 9899466888
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-09-06 Thread Kunal Patil
sizeof never executes whatever expression is given as parameter.
It needs only size of parameter.
In this case, parameter main() returns an int type.
So sizeof returns sizeof int. It doesnt need to call main() to get its task,
of finding size, done.

On Tue, Sep 6, 2011 at 11:41 PM, siddharam suresh
wrote:

> its size of return type, but why the above program not showing segmentation
> fault?
> Thank you,
> Sid.
>
>
>
> On Tue, Sep 6, 2011 at 11:34 PM, ankush garg  wrote:
>
>> better contact AKSHAY CHADHA .. the person is quite good at c and
>> algos currently placed in MICROSOFT..
>> akshay.chadha...@gmail.com
>> 9899466888
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re:

2011-09-06 Thread siddharam suresh
its size of return type, but why the above program not showing segmentation
fault?
Thank you,
Sid.



On Tue, Sep 6, 2011 at 11:34 PM, ankush garg  wrote:

> better contact AKSHAY CHADHA .. the person is quite good at c and
> algos currently placed in MICROSOFT..
> akshay.chadha...@gmail.com
> 9899466888
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re:

2011-09-06 Thread ankush garg
better contact AKSHAY CHADHA .. the person is quite good at c and
algos currently placed in MICROSOFT..
akshay.chadha...@gmail.com
9899466888

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-09-06 Thread siddharam suresh
if its size of return type, the program has to show segmentation error (it
calls main infinitely,BTW size of void = 1).

Thank you,
Sid.



On Tue, Sep 6, 2011 at 11:26 PM, Sanjay Rajpal  wrote:

> if main() were a pointer, then
> char c()
> {
>   return '1';
> }
>
> int main()
> {
> printf("%d",sizeof(c()));
> }
> would also have shown 4, but it shows 1. I think there is a hidden concept.
>
> If we change the return type of c() to void, it shows an error.
> But instead of c(), we use main() with void as return type, it shows 4.
>
> Whats happening here ?
>
>
>
>
> Sanju
> :)
>
>
>
> On Tue, Sep 6, 2011 at 10:51 AM, siddharam suresh  > wrote:
>
>> *main()* is an address/probably the function pointer,
>> Thank you,
>> Sid.
>>
>>
>>
>> On Tue, Sep 6, 2011 at 11:19 PM, Sanjay Rajpal  wrote:
>>
>>>  #include 
>>> #include
>>> int main() {
>>>
>>> printf(" %d",sizeof(main()));
>>> ... getche();
>>> return 0;
>>> }
>>> o/p is 4..how ???
>>>
>>>
>>> Sanju
>>> :)
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>   --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-09-06 Thread Sanjay Rajpal
if main() were a pointer, then
char c()
{
  return '1';
}

int main()
{
printf("%d",sizeof(c()));
}
would also have shown 4, but it shows 1. I think there is a hidden concept.

If we change the return type of c() to void, it shows an error.
But instead of c(), we use main() with void as return type, it shows 4.

Whats happening here ?




Sanju
:)



On Tue, Sep 6, 2011 at 10:51 AM, siddharam suresh
wrote:

> *main()* is an address/probably the function pointer,
> Thank you,
> Sid.
>
>
>
> On Tue, Sep 6, 2011 at 11:19 PM, Sanjay Rajpal  wrote:
>
>>  #include 
>> #include
>> int main() {
>>
>> printf(" %d",sizeof(main()));
>> ... getche();
>> return 0;
>> }
>> o/p is 4..how ???
>>
>>
>> Sanju
>> :)
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>   --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-09-06 Thread himanshu kansal
sizeof is nt defined for function typeundefined reslt

On Tue, Sep 6, 2011 at 11:21 PM, siddharam suresh
wrote:

> *main()* is an address/probably the function pointer,
> Thank you,
> Sid.
>
>
>
> On Tue, Sep 6, 2011 at 11:19 PM, Sanjay Rajpal  wrote:
>
>> #include 
>> #include
>> int main() {
>>
>> printf(" %d",sizeof(main()));
>> ... getche();
>> return 0;
>> }
>> o/p is 4..how ???
>>
>>
>> Sanju
>> :)
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 

   Regards
 Himanshu Kansal
   Msc Comp. sc.
(University of Delhi)

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-09-06 Thread SANDEEP CHUGH
i think  "main" gives the address not "main() "

??

On Tue, Sep 6, 2011 at 11:21 PM, siddharam suresh
wrote:

> *main()* is an address/probably the function pointer,
> Thank you,
> Sid.
>
>
>
> On Tue, Sep 6, 2011 at 11:19 PM, Sanjay Rajpal  wrote:
>
>> #include 
>> #include
>> int main() {
>>
>> printf(" %d",sizeof(main()));
>> ... getche();
>> return 0;
>> }
>> o/p is 4..how ???
>>
>>
>> Sanju
>> :)
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread sukran dhawan
+1 to piyush

On Tue, Sep 6, 2011 at 11:15 PM, Piyush Grover wrote:

> this can be done using heap tree data structure.
>
> -create a max heap tree of first k elements (for finding kth min)
>  -keep on adding elements in the heap
> if the root element is greater than the current element, remove root
> element and insert the current element in the tree
> once done with n elements
> the root element will give the kth min element.
> Time complexity: O(nlogk)
> Tho piyushis method is very much effective for k << n (when k is a
> constant)
>
> Same can be done for kth max.
>
>
> On Tue, Sep 6, 2011 at 9:00 PM, Shravan Kumar  wrote:
>
>>
>> http://jonah.cs.elon.edu/sduvall2/courses/csc331/2006spring/Lectures/Order_statistics.ppt
>>
>>
>> On Tue, Sep 6, 2011 at 7:53 PM, yamini gupta 
>> wrote:
>>
>>> partition the array using quick sort
>>> and find the kth smallest or largest number
>>>
>>>
>>> On Sep 6, 12:20 am, learner  wrote:
>>> > @Dave,All So Can Anyone Provide The Working Code in Linear Time for
>>> > the same ?
>>> >
>>> > Thanks
>>> >
>>> > On Sep 5, 6:41 pm, Dave  wrote:
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > @Sachin: Correct: in one quicksort pivoting pass, the array is
>>> > > rearranged so that the pivot element is put in the correct spot, with
>>> > > larger elements on the right and smaller ones on the left. Now, if
>>> the
>>> > > pivot, a[p], is at location k, i.e. p = k, then you are done. If not,
>>> > > do another quicksort on the correct side of p; i.e., either on a[0]
>>> to
>>> > > a[p-1] or on a[p+1] to a[n-1], depending on whether k is less than p
>>> > > or greater than p.
>>> >
>>> > > Dave
>>> >
>>> > > On Sep 5, 1:27 am, sachin goyal  wrote:
>>> >
>>> > > > PLEASE TELL ME HOW WE CAN USE QUICK SORT TO FIND THE ELEMENT
>>> > > > BECAUSE IN QUICK SORT ONE ELEMENT IN SHIFT IN ITS RIGHT POSITION
>>> ALL LEFTS
>>> > > > ARE SMALLER AND ALL RIGHT ARE BIG
>>> >
>>> > > > On Mon, Sep 5, 2011 at  POSIT11:55 AM, sachin goyal
>>> > > > wrote:
>>> >
>>> > > > > PLEASE TELL HOW
>>> >
>>> > > > > On Sun, Sep 4, 2011 at 7:23 PM, sarath prasath <
>>> prasathsar...@gmail.com>wrote:
>>> >
>>> > > > >> another sol which i learned from my friend is
>>> > > > >> think of heap sort...
>>> >
>>> > > > >> On Sun, Sep 4, 2011 at 6:28 PM, learner <
>>> nimish7andr...@gmail.com> wrote:
>>> >
>>> > > > >>> something I Know using quick sort randomization function we can
>>> find
>>> > > > >>> kt smallest/largest in unsorted array , but i am not able to
>>> write
>>> > > > >>> code , please help me in this and provide the code for the
>>> same.?
>>> >
>>> > > > >>> Thanks
>>> > > > >>> Nimish K.
>>> > > > >>> 1st Year
>>> > > > >>> IITR
>>> >
>>> > > > >>> --
>>> > > > >>> You received this message because you are subscribed to the
>>> Google Groups
>>> > > > >>> "Algorithm Geeks" group.
>>> > > > >>> To post to this group, send email to
>>> algogeeks@googlegroups.com.
>>> > > > >>> To unsubscribe from this group, send email to
>>> > > > >>> algogeeks+unsubscr...@googlegroups.com.
>>> > > > >>> For more options, visit this group at
>>> > > > >>>http://groups.google.com/group/algogeeks?hl=en.
>>> >
>>> > > > >>  --
>>> > > > >> You received this message because you are subscribed to the
>>> Google Groups
>>> > > > >> "Algorithm Geeks" group.
>>> > > > >> To post to this group, send email to algogeeks@googlegroups.com
>>> .
>>> > > > >> To unsubscribe from this group, send email to
>>> > > > >> algogeeks+unsubscr...@googlegroups.com.
>>> > > > >> For more options, visit this group at
>>> > > > >>http://groups.google.com/group/algogeeks?hl=en.-Hidequoted text
>>> -
>>> >
>>> > > > - Show quoted text -
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
alg

Re: [algogeeks]

2011-09-06 Thread sukran dhawan
function pointer

so answer is size of pointer can be 4 or 2 depending on word size

On Tue, Sep 6, 2011 at 11:21 PM, siddharam suresh
wrote:

> *main()* is an address/probably the function pointer,
> Thank you,
> Sid.
>
>
>
> On Tue, Sep 6, 2011 at 11:19 PM, Sanjay Rajpal  wrote:
>
>> #include 
>> #include
>> int main() {
>>
>> printf(" %d",sizeof(main()));
>> ... getche();
>> return 0;
>> }
>> o/p is 4..how ???
>>
>>
>> Sanju
>> :)
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-09-06 Thread siddharam suresh
*main()* is an address/probably the function pointer,
Thank you,
Sid.



On Tue, Sep 6, 2011 at 11:19 PM, Sanjay Rajpal  wrote:

> #include 
> #include
> int main() {
>
> printf(" %d",sizeof(main()));
> ... getche();
> return 0;
> }
> o/p is 4..how ???
>
>
> Sanju
> :)
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks]

2011-09-06 Thread Sanjay Rajpal
#include 
#include
int main() {

printf(" %d",sizeof(main()));
... getche();
return 0;
}
o/p is 4..how ???


Sanju
:)

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread Piyush Grover
this can be done using heap tree data structure.

-create a max heap tree of first k elements (for finding kth min)
 -keep on adding elements in the heap
if the root element is greater than the current element, remove root element
and insert the current element in the tree
once done with n elements
the root element will give the kth min element.
Time complexity: O(nlogk)
This method is very much effective for k << n (when k is a constant)

Same can be done for kth max.

On Tue, Sep 6, 2011 at 9:00 PM, Shravan Kumar  wrote:

>
> http://jonah.cs.elon.edu/sduvall2/courses/csc331/2006spring/Lectures/Order_statistics.ppt
>
>
> On Tue, Sep 6, 2011 at 7:53 PM, yamini gupta 
> wrote:
>
>> partition the array using quick sort
>> and find the kth smallest or largest number
>>
>>
>> On Sep 6, 12:20 am, learner  wrote:
>> > @Dave,All So Can Anyone Provide The Working Code in Linear Time for
>> > the same ?
>> >
>> > Thanks
>> >
>> > On Sep 5, 6:41 pm, Dave  wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > @Sachin: Correct: in one quicksort pivoting pass, the array is
>> > > rearranged so that the pivot element is put in the correct spot, with
>> > > larger elements on the right and smaller ones on the left. Now, if the
>> > > pivot, a[p], is at location k, i.e. p = k, then you are done. If not,
>> > > do another quicksort on the correct side of p; i.e., either on a[0] to
>> > > a[p-1] or on a[p+1] to a[n-1], depending on whether k is less than p
>> > > or greater than p.
>> >
>> > > Dave
>> >
>> > > On Sep 5, 1:27 am, sachin goyal  wrote:
>> >
>> > > > PLEASE TELL ME HOW WE CAN USE QUICK SORT TO FIND THE ELEMENT
>> > > > BECAUSE IN QUICK SORT ONE ELEMENT IN SHIFT IN ITS RIGHT POSITION ALL
>> LEFTS
>> > > > ARE SMALLER AND ALL RIGHT ARE BIG
>> >
>> > > > On Mon, Sep 5, 2011 at  POSIT11:55 AM, sachin goyal
>> > > > wrote:
>> >
>> > > > > PLEASE TELL HOW
>> >
>> > > > > On Sun, Sep 4, 2011 at 7:23 PM, sarath prasath <
>> prasathsar...@gmail.com>wrote:
>> >
>> > > > >> another sol which i learned from my friend is
>> > > > >> think of heap sort...
>> >
>> > > > >> On Sun, Sep 4, 2011 at 6:28 PM, learner <
>> nimish7andr...@gmail.com> wrote:
>> >
>> > > > >>> something I Know using quick sort randomization function we can
>> find
>> > > > >>> kt smallest/largest in unsorted array , but i am not able to
>> write
>> > > > >>> code , please help me in this and provide the code for the
>> same.?
>> >
>> > > > >>> Thanks
>> > > > >>> Nimish K.
>> > > > >>> 1st Year
>> > > > >>> IITR
>> >
>> > > > >>> --
>> > > > >>> You received this message because you are subscribed to the
>> Google Groups
>> > > > >>> "Algorithm Geeks" group.
>> > > > >>> To post to this group, send email to algogeeks@googlegroups.com
>> .
>> > > > >>> To unsubscribe from this group, send email to
>> > > > >>> algogeeks+unsubscr...@googlegroups.com.
>> > > > >>> For more options, visit this group at
>> > > > >>>http://groups.google.com/group/algogeeks?hl=en.
>> >
>> > > > >>  --
>> > > > >> You received this message because you are subscribed to the
>> Google Groups
>> > > > >> "Algorithm Geeks" group.
>> > > > >> To post to this group, send email to algogeeks@googlegroups.com.
>> > > > >> To unsubscribe from this group, send email to
>> > > > >> algogeeks+unsubscr...@googlegroups.com.
>> > > > >> For more options, visit this group at
>> > > > >>http://groups.google.com/group/algogeeks?hl=en.-Hidequoted text -
>> >
>> > > > - Show quoted text -
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: problems about the puzzle "Chameleon"

2011-09-06 Thread Don
@Sandeep: there are 45 chameleons, not 44.
If blue and green meet first, there will be 15 red, not 14.

You can find all of the possible combinations very quickly using a
46x46 table. Start with all cells set to false except for the first
(13,15). If you know the red and green count, you can deduce blue.
Now loop over all the cells. For any which is set to possible, look at
all combinations which can be reached from there by one meeting. If
any are not set to possible, set them to possible.
Repeat until one pass finds no new possible cells. You will find 360
possible states, and none of them have 45 of any one color. Code
follows.
Don

int main(int argc, char* argv[])
{
int r,g,b;
int possible[46][46] = {{0}};
possible[13][15] = 1;
int prevPossible, numPossible = 1;

do
{
prevPossible = numPossible;
for(r = 0; r < 46; ++r)
for(g = 0; g < 46; ++g)
{
b = 45-r-g;
if (b < 0) break;
if (possible[r][g])
{
if (r && g && !possible[r-1][g-1])
{
possible[r-1][g-1] = 1;
++numPossible;
}
if (r && b && !possible[r-1][g+2])
{
possible[r-1][g+2] = 1;
++numPossible;
}
if (g && b && !possible[r+2][g-1])
{
possible[r+2][g-1] = 1;
++numPossible;
}
}
}
} while(numPossible > prevPossible);
printf("%d positions are possible\n", numPossible);
if (possible[45][0]) printf("45 red is possible\n");
if (possible[0][45]) printf("45 green is possible\n");
if (possible[0][0]) printf("45 blue is possible\n");
return 0;
}

On Sep 6, 11:13 am, sandeep gupta  wrote:
> let the blue and green chameleon meet first.
> Result :
> 14 - red
> 14 - green
> 16 - blue
> now 14 times pair of red and green meet to make it all 44 blue
>
> On Sep 5, 11:44 pm, Don  wrote:
>
> > Yes, you are right, it is 4 in that case. It seems that f is always
> > even. It is possible for 44 chameleons to be one color, but then there
> > is only one left and it cannot change to that color. Any time there
> > are 43 chameleons of one color, the other two are the same color.
> >  It is true that all the chameleons can never be the same color, but I
> > agree that his "proof" is not valid.
> > Don
>
> > On Sep 5, 9:08 pm, wujin chen  wrote:
>
> > > hi Don, i think f(15,14,16) =|15-14|+|14-16|+|16-15| = 1+2+1=4, hou do you
> > > get f(15,14,16) = 5?
>
> > > 2011/9/6 Don 
>
> > > > No, f(15,14,16) = 5.
> > > > Don
>
> > > > On Sep 5, 8:33 pm, wujin chen  wrote:
> > > > > hi all, i encountered this puzzle 
> > > > > (http://www.crackpuzzles.com/?p=236):
>
> > > > > At one point, a remote island's population of chameleons was divided 
> > > > > as
> > > > > follows:
> > > > > - 13 red chameleons
> > > > > - 15 green chameleons
> > > > > - 17 blue chameleons
> > > > > Each time two different colored chameleons would meet, they would 
> > > > > change
> > > > > their color to the third one. (i.e.. If green meets red, they both 
> > > > > change
> > > > > their color to blue.) Is it ever possible for all chameleons to become
> > > > the
> > > > > same color? Why or why not?"
>
> > > > > and the solution provided by auther is like this:
> > > > > *Solution: *
> > > > > Lets define a function f(red, blue, green) = |red - blue| + |blue -
> > > > green| +
> > > > > |green - red|
> > > > > When two chameleons of different colours meet and convert to the third
> > > > one,
> > > > > the value of function f will always change by 0 or 3 or 6 (i.e. a
> > > > multiple
> > > > > of 3). In the initial situation f is 8.
> > > > > If all of them get converted into a single colour then f would be 90 =
> > > > > 2*(red+blue+green)
> > > > > So we are basically looking for a solution to the equation: 8 + 3x = 
> > > > > 90,
> > > > > which has no integer solutions. Hence it is not possible.
>
> > > > > well, my problem is this:
>
> > > > > f(13,15,17)=8,
> > > > > f(15,14,16)=2
> > > > > so , we can see that " the value of function f will always change by 
> > > > > 0 or
> > > > 3
> > > > > or 6″ is not true, i am wondering~!
>
> > > > --
> > > > You received this message because you are subscribed to the Goo

Re: [algogeeks] c output .. help plz

2011-09-06 Thread sukran dhawan
coz both floating point are stored in ieee format which is different from
integers

On Tue, Sep 6, 2011 at 10:18 PM, sukran dhawan wrote:

> it wil not truncate the floating point to integer remember...
>
>
> On Tue, Sep 6, 2011 at 9:55 PM, sivaviknesh s wrote:
>
>> printf("%d",3.14*6.25*6.25);
>>
>> ...ans : 0 ..how and why?? why not type conversion take place??
>>
>> --
>> Regards,
>> $iva
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] c output .. help plz

2011-09-06 Thread sukran dhawan
it wil not truncate the floating point to integer remember...

On Tue, Sep 6, 2011 at 9:55 PM, sivaviknesh s wrote:

> printf("%d",3.14*6.25*6.25);
>
> ...ans : 0 ..how and why?? why not type conversion take place??
>
> --
> Regards,
> $iva
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] FUNCTION POINTER IN C

2011-09-06 Thread Puneet Ginoria
i am getting things in C++ but i need all this to be done in C.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] sap labs

2011-09-06 Thread siva viknesh
hi
   anybody who attended plz share interview experiences and also
written test ques

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: macro

2011-09-06 Thread Dave
@Sandy: You could use this when you need to round up a number to a
number that has a certain number of low-order zeros. As far as a
practical application: when you need it you need it.

Dave

On Sep 6, 10:31 am, Sandy  wrote:
> What is the practical application of this expression?
>
>
>
>
>
> On Tue, Sep 6, 2011 at 5:38 PM, Dave  wrote:
> > @Mohit: If n is a power of 2, then the macro returns x if x is a
> > multiple of n or x rounded up to the next multiple of n if x is not a
> > multiple of n. E.g., ROUNDUP(16,4) = 16 and ROUNDUP(17,4) = 20. The
> > result doesn't appear useful if n is not a power of 2.
>
> > Since ~(n-1) = -n, it could be written more compactly as
>
> >  #define ROUNDUP(x,n) ((x+n-1)&(-(n)))
>
> > Dave
>
> > On Sep 6, 5:06 am, Mohit Goel  wrote:
> > >  #define ROUNDUP(x,n) ((x+n-1)&(~(n-1)))
>
> > > what does the following macro do 
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.
>
> --
>
> *Sandeep Kumar,*
>  ( Mobile +91-9866507368
>
> *“I believe in smart work, Believe Me”*- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread Dave
@Yamini: The quicksort partitioning method will find the kth order
statistic in _average_ time O(n), but the worst cast time is O(n^2).
Getting O(n) worst cast behavior is more complicated. Shravan gives a
helpful link that describes the algorithm well.

Dave

On Sep 6, 9:23 am, yamini gupta  wrote:
> partition the array using quick sort
> and find the kth smallest or largest number
>
> On Sep 6, 12:20 am, learner  wrote:
>
>
>
> > @Dave,All So Can Anyone Provide The Working Code in Linear Time for
> > the same ?
>
> > Thanks
>
> > On Sep 5, 6:41 pm, Dave  wrote:
>
> > > @Sachin: Correct: in one quicksort pivoting pass, the array is
> > > rearranged so that the pivot element is put in the correct spot, with
> > > larger elements on the right and smaller ones on the left. Now, if the
> > > pivot, a[p], is at location k, i.e. p = k, then you are done. If not,
> > > do another quicksort on the correct side of p; i.e., either on a[0] to
> > > a[p-1] or on a[p+1] to a[n-1], depending on whether k is less than p
> > > or greater than p.
>
> > > Dave
>
> > > On Sep 5, 1:27 am, sachin goyal  wrote:
>
> > > > PLEASE TELL ME HOW WE CAN USE QUICK SORT TO FIND THE ELEMENT
> > > > BECAUSE IN QUICK SORT ONE ELEMENT IN SHIFT IN ITS RIGHT POSITION ALL 
> > > > LEFTS
> > > > ARE SMALLER AND ALL RIGHT ARE BIG
>
> > > > On Mon, Sep 5, 2011 at  POSIT11:55 AM, sachin goyal
> > > > wrote:
>
> > > > > PLEASE TELL HOW
>
> > > > > On Sun, Sep 4, 2011 at 7:23 PM, sarath prasath 
> > > > > wrote:
>
> > > > >> another sol which i learned from my friend is
> > > > >> think of heap sort...
>
> > > > >> On Sun, Sep 4, 2011 at 6:28 PM, learner  
> > > > >> wrote:
>
> > > > >>> something I Know using quick sort randomization function we can find
> > > > >>> kt smallest/largest in unsorted array , but i am not able to write
> > > > >>> code , please help me in this and provide the code for the same.?
>
> > > > >>> Thanks
> > > > >>> Nimish K.
> > > > >>> 1st Year
> > > > >>> IITR
>
> > > > >>> --
> > > > >>> You received this message because you are subscribed to the Google 
> > > > >>> Groups
> > > > >>> "Algorithm Geeks" group.
> > > > >>> To post to this group, send email to algogeeks@googlegroups.com.
> > > > >>> To unsubscribe from this group, send email to
> > > > >>> algogeeks+unsubscr...@googlegroups.com.
> > > > >>> For more options, visit this group at
> > > > >>>http://groups.google.com/group/algogeeks?hl=en.
>
> > > > >>  --
> > > > >> You received this message because you are subscribed to the Google 
> > > > >> Groups
> > > > >> "Algorithm Geeks" group.
> > > > >> To post to this group, send email to algogeeks@googlegroups.com.
> > > > >> To unsubscribe from this group, send email to
> > > > >> algogeeks+unsubscr...@googlegroups.com.
> > > > >> For more options, visit this group at
> > > > >>http://groups.google.com/group/algogeeks?hl=en.-Hidequotedtext -
>
> > > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] c output .. help plz

2011-09-06 Thread sivaviknesh s
 printf("%d",3.14*6.25*6.25);

...ans : 0 ..how and why?? why not type conversion take place??

-- 
Regards,
$iva

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: C output????

2011-09-06 Thread siva viknesh
thanks a lot guys :)

On Sep 6, 11:48 am, Rajeshwar Patra  wrote:
> pointer points to read only memory location
> and this address is then compared whch evaluates to true
> hence the output...

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: problems about the puzzle "Chameleon"

2011-09-06 Thread Sandy
@SandeepGupta: That ways red will be 15.

On Tue, Sep 6, 2011 at 9:43 PM, sandeep gupta wrote:

> let the blue and green chameleon meet first.
> Result :
> 14 - red
> 14 - green
> 16 - blue
> now 14 times pair of red and green meet to make it all 44 blue
>
> On Sep 5, 11:44 pm, Don  wrote:
> > Yes, you are right, it is 4 in that case. It seems that f is always
> > even. It is possible for 44 chameleons to be one color, but then there
> > is only one left and it cannot change to that color. Any time there
> > are 43 chameleons of one color, the other two are the same color.
> >  It is true that all the chameleons can never be the same color, but I
> > agree that his "proof" is not valid.
> > Don
> >
> > On Sep 5, 9:08 pm, wujin chen  wrote:
> >
> >
> >
> > > hi Don, i think f(15,14,16) =|15-14|+|14-16|+|16-15| = 1+2+1=4, hou do
> you
> > > get f(15,14,16) = 5?
> >
> > > 2011/9/6 Don 
> >
> > > > No, f(15,14,16) = 5.
> > > > Don
> >
> > > > On Sep 5, 8:33 pm, wujin chen  wrote:
> > > > > hi all, i encountered this puzzle (
> http://www.crackpuzzles.com/?p=236):
> >
> > > > > At one point, a remote island's population of chameleons was
> divided as
> > > > > follows:
> > > > > - 13 red chameleons
> > > > > - 15 green chameleons
> > > > > - 17 blue chameleons
> > > > > Each time two different colored chameleons would meet, they would
> change
> > > > > their color to the third one. (i.e.. If green meets red, they both
> change
> > > > > their color to blue.) Is it ever possible for all chameleons to
> become
> > > > the
> > > > > same color? Why or why not?"
> >
> > > > > and the solution provided by auther is like this:
> > > > > *Solution: *
> > > > > Lets define a function f(red, blue, green) = |red - blue| + |blue -
> > > > green| +
> > > > > |green - red|
> > > > > When two chameleons of different colours meet and convert to the
> third
> > > > one,
> > > > > the value of function f will always change by 0 or 3 or 6 (i.e. a
> > > > multiple
> > > > > of 3). In the initial situation f is 8.
> > > > > If all of them get converted into a single colour then f would be
> 90 =
> > > > > 2*(red+blue+green)
> > > > > So we are basically looking for a solution to the equation: 8 + 3x
> = 90,
> > > > > which has no integer solutions. Hence it is not possible.
> >
> > > > > well, my problem is this:
> >
> > > > > f(13,15,17)=8,
> > > > > f(15,14,16)=2
> > > > > so , we can see that " the value of function f will always change
> by 0 or
> > > > 3
> > > > > or 6″ is not true, i am wondering~!
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> Groups
> > > > "Algorithm Geeks" group.
> > > > To post to this group, send email to algogeeks@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > algogeeks+unsubscr...@googlegroups.com.
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 

*Sandeep Kumar,*
 ( Mobile +91-9866507368

*“I believe in smart work, Believe Me”*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: problems about the puzzle "Chameleon"

2011-09-06 Thread sandeep gupta
let the blue and green chameleon meet first.
Result :
14 - red
14 - green
16 - blue
now 14 times pair of red and green meet to make it all 44 blue

On Sep 5, 11:44 pm, Don  wrote:
> Yes, you are right, it is 4 in that case. It seems that f is always
> even. It is possible for 44 chameleons to be one color, but then there
> is only one left and it cannot change to that color. Any time there
> are 43 chameleons of one color, the other two are the same color.
>  It is true that all the chameleons can never be the same color, but I
> agree that his "proof" is not valid.
> Don
>
> On Sep 5, 9:08 pm, wujin chen  wrote:
>
>
>
> > hi Don, i think f(15,14,16) =|15-14|+|14-16|+|16-15| = 1+2+1=4, hou do you
> > get f(15,14,16) = 5?
>
> > 2011/9/6 Don 
>
> > > No, f(15,14,16) = 5.
> > > Don
>
> > > On Sep 5, 8:33 pm, wujin chen  wrote:
> > > > hi all, i encountered this puzzle (http://www.crackpuzzles.com/?p=236):
>
> > > > At one point, a remote island's population of chameleons was divided as
> > > > follows:
> > > > - 13 red chameleons
> > > > - 15 green chameleons
> > > > - 17 blue chameleons
> > > > Each time two different colored chameleons would meet, they would change
> > > > their color to the third one. (i.e.. If green meets red, they both 
> > > > change
> > > > their color to blue.) Is it ever possible for all chameleons to become
> > > the
> > > > same color? Why or why not?"
>
> > > > and the solution provided by auther is like this:
> > > > *Solution: *
> > > > Lets define a function f(red, blue, green) = |red - blue| + |blue -
> > > green| +
> > > > |green - red|
> > > > When two chameleons of different colours meet and convert to the third
> > > one,
> > > > the value of function f will always change by 0 or 3 or 6 (i.e. a
> > > multiple
> > > > of 3). In the initial situation f is 8.
> > > > If all of them get converted into a single colour then f would be 90 =
> > > > 2*(red+blue+green)
> > > > So we are basically looking for a solution to the equation: 8 + 3x = 90,
> > > > which has no integer solutions. Hence it is not possible.
>
> > > > well, my problem is this:
>
> > > > f(13,15,17)=8,
> > > > f(15,14,16)=2
> > > > so , we can see that " the value of function f will always change by 0 
> > > > or
> > > 3
> > > > or 6″ is not true, i am wondering~!
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Algorithm Geeks" group.
> > > To post to this group, send email to algogeeks@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > algogeeks+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output????

2011-09-06 Thread Sandy
String constants (literals) are saved into the .data section of the program,
 Here is the sample program to show that.  if() is essentially comparing the
addresses of two pointers which is same.

int main()
{
char *p="persons";
char *q="persons";
char *r="persons";
char *s="persons";
 printf("%x %x %x %x\n",p,q,r,s);
if(p=="persons")
printf("technical %s",p);
else
printf("true %s",p);
return 0;
}
-
Output:
403021 403021 403021 403021
technical persons

On Tue, Sep 6, 2011 at 9:04 PM, sivaviknesh s wrote:

>
> main()
> {
> char *p="persons";
> clrscr();
> if(p=="persons")
> printf("technical %s",p);
> else
> printf("true %s",p);
> return 0;
> }
>
> ..op : technical persons ..plz explain .. how come it works like an strcmp
> operation???
> --
> Regards,
> $iva
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 

*Sandeep Kumar,*
 ( Mobile +91-9866507368

*“I believe in smart work, Believe Me”*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output????

2011-09-06 Thread sukran dhawan
addresses are compared here  i think

On Tue, Sep 6, 2011 at 9:04 PM, sivaviknesh s wrote:

>
> main()
> {
> char *p="persons";
> clrscr();
> if(p=="persons")
> printf("technical %s",p);
> else
> printf("true %s",p);
> return 0;
> }
>
> ..op : technical persons ..plz explain .. how come it works like an strcmp
> operation???
> --
> Regards,
> $iva
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output????

2011-09-06 Thread Rajeshwar Patra
pointer points to read only memory location
and this address is then compared whch evaluates to true
hence the output...

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output????

2011-09-06 Thread Dheeraj Sharma
in case of constant strings..they all return the same pointer..where they
are defined..
but in case of non constant strings..like a[]="sumthing" and
b[]="sumthing"...they will have separate memory allocations..

On Tue, Sep 6, 2011 at 9:12 PM, aditi garg wrote:

> It is basically comparing the addresses  of the two and since p contains
> the memory address of "persons" it gives the output as technical persons...
> infact ull be surprised to see dis
>
> #include
> main(){char p[]="persons";char q[]="persons";if(p==q)
> printf 
> ("technical
>  %s",p);elseprintf 
> ("true 
> %s",p);return 0;}
>
> output : true persons
>
>
> #include
> main(){char *p="persons";char *q="persons";if(p==q)
> printf 
> ("technical
>  %s",p);elseprintf 
> ("true 
> %s",p);return 0;
>
> }
> bt Here output will be Technical persons
> On Tue, Sep 6, 2011 at 9:04 PM, sivaviknesh s wrote:
>
>>
>> main()
>> {
>> char *p="persons";
>> clrscr();
>> if(p=="persons")
>> printf("technical %s",p);
>> else
>> printf("true %s",p);
>> return 0;
>> }
>>
>> ..op : technical persons ..plz explain .. how come it works like an strcmp
>> operation???
>> --
>> Regards,
>> $iva
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
*Dheeraj Sharma*
Comp Engg.
NIT Kurukshetra
+91 8950264227

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output????

2011-09-06 Thread aditi garg
It is basically comparing the addresses  of the two and since p contains the
memory address of "persons" it gives the output as technical persons...
infact ull be surprised to see dis

#include
main(){char p[]="persons";char q[]="persons";if(p==q)printf
("technical
%s",p);elseprintf
("true
%s",p);return 0;}

output : true persons


#include
main(){char *p="persons";char *q="persons";if(p==q)printf
("technical
%s",p);elseprintf
("true
%s",p);return 0;

}
bt Here output will be Technical persons
On Tue, Sep 6, 2011 at 9:04 PM, sivaviknesh s wrote:

>
> main()
> {
> char *p="persons";
> clrscr();
> if(p=="persons")
> printf("technical %s",p);
> else
> printf("true %s",p);
> return 0;
> }
>
> ..op : technical persons ..plz explain .. how come it works like an strcmp
> operation???
> --
> Regards,
> $iva
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Aditi Garg
Undergraduate Student
Electronics & Communication Divison
NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
Sector 3, Dwarka
New Delhi

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output????

2011-09-06 Thread Shravan Kumar
String literals are saved into a separate table in compiler. So second time
when you define "persons" it wont be created or allocated memory as it
already exists in table.

On Tue, Sep 6, 2011 at 9:04 PM, sivaviknesh s wrote:

>
> main()
> {
> char *p="persons";
> clrscr();
> if(p=="persons")
> printf("technical %s",p);
> else
> printf("true %s",p);
> return 0;
> }
>
> ..op : technical persons ..plz explain .. how come it works like an strcmp
> operation???
> --
> Regards,
> $iva
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] C output????

2011-09-06 Thread sivaviknesh s
main()
{
char *p="persons";
clrscr();
if(p=="persons")
printf("technical %s",p);
else
printf("true %s",p);
return 0;
}

..op : technical persons ..plz explain .. how come it works like an strcmp
operation???
-- 
Regards,
$iva

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: macro

2011-09-06 Thread Sandy
What is the practical application of this expression?

On Tue, Sep 6, 2011 at 5:38 PM, Dave  wrote:

> @Mohit: If n is a power of 2, then the macro returns x if x is a
> multiple of n or x rounded up to the next multiple of n if x is not a
> multiple of n. E.g., ROUNDUP(16,4) = 16 and ROUNDUP(17,4) = 20. The
> result doesn't appear useful if n is not a power of 2.
>
> Since ~(n-1) = -n, it could be written more compactly as
>
>  #define ROUNDUP(x,n) ((x+n-1)&(-(n)))
>
> Dave
>
> On Sep 6, 5:06 am, Mohit Goel  wrote:
> >  #define ROUNDUP(x,n) ((x+n-1)&(~(n-1)))
> >
> > what does the following macro do 
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 

*Sandeep Kumar,*
 ( Mobile +91-9866507368

*“I believe in smart work, Believe Me”*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread Shravan Kumar
http://jonah.cs.elon.edu/sduvall2/courses/csc331/2006spring/Lectures/Order_statistics.ppt

On Tue, Sep 6, 2011 at 7:53 PM, yamini gupta wrote:

> partition the array using quick sort
> and find the kth smallest or largest number
>
>
> On Sep 6, 12:20 am, learner  wrote:
> > @Dave,All So Can Anyone Provide The Working Code in Linear Time for
> > the same ?
> >
> > Thanks
> >
> > On Sep 5, 6:41 pm, Dave  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > @Sachin: Correct: in one quicksort pivoting pass, the array is
> > > rearranged so that the pivot element is put in the correct spot, with
> > > larger elements on the right and smaller ones on the left. Now, if the
> > > pivot, a[p], is at location k, i.e. p = k, then you are done. If not,
> > > do another quicksort on the correct side of p; i.e., either on a[0] to
> > > a[p-1] or on a[p+1] to a[n-1], depending on whether k is less than p
> > > or greater than p.
> >
> > > Dave
> >
> > > On Sep 5, 1:27 am, sachin goyal  wrote:
> >
> > > > PLEASE TELL ME HOW WE CAN USE QUICK SORT TO FIND THE ELEMENT
> > > > BECAUSE IN QUICK SORT ONE ELEMENT IN SHIFT IN ITS RIGHT POSITION ALL
> LEFTS
> > > > ARE SMALLER AND ALL RIGHT ARE BIG
> >
> > > > On Mon, Sep 5, 2011 at  POSIT11:55 AM, sachin goyal
> > > > wrote:
> >
> > > > > PLEASE TELL HOW
> >
> > > > > On Sun, Sep 4, 2011 at 7:23 PM, sarath prasath <
> prasathsar...@gmail.com>wrote:
> >
> > > > >> another sol which i learned from my friend is
> > > > >> think of heap sort...
> >
> > > > >> On Sun, Sep 4, 2011 at 6:28 PM, learner 
> wrote:
> >
> > > > >>> something I Know using quick sort randomization function we can
> find
> > > > >>> kt smallest/largest in unsorted array , but i am not able to
> write
> > > > >>> code , please help me in this and provide the code for the same.?
> >
> > > > >>> Thanks
> > > > >>> Nimish K.
> > > > >>> 1st Year
> > > > >>> IITR
> >
> > > > >>> --
> > > > >>> You received this message because you are subscribed to the
> Google Groups
> > > > >>> "Algorithm Geeks" group.
> > > > >>> To post to this group, send email to algogeeks@googlegroups.com.
> > > > >>> To unsubscribe from this group, send email to
> > > > >>> algogeeks+unsubscr...@googlegroups.com.
> > > > >>> For more options, visit this group at
> > > > >>>http://groups.google.com/group/algogeeks?hl=en.
> >
> > > > >>  --
> > > > >> You received this message because you are subscribed to the Google
> Groups
> > > > >> "Algorithm Geeks" group.
> > > > >> To post to this group, send email to algogeeks@googlegroups.com.
> > > > >> To unsubscribe from this group, send email to
> > > > >> algogeeks+unsubscr...@googlegroups.com.
> > > > >> For more options, visit this group at
> > > > >>http://groups.google.com/group/algogeeks?hl=en.-Hidequoted text -
> >
> > > > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: convert a word into a palindrome with minimum addition of letters to it

2011-09-06 Thread Shravan Kumar
@Yamini  Please read the subject of this mail

On Tue, Sep 6, 2011 at 7:54 PM, yamini gupta wrote:

> add all the characters present in the string in reversed order to the
> string
>
> On Sep 6, 1:26 pm, surender sanke  wrote:
> > @sukran, string shouldn't be replaced, only addition of characters
> allowed
> >
> > On Tue, Sep 6, 2011 at 1:48 PM, sukran dhawan  >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > my soln works without increasing the string length
> >
> > > just start with first and last character copy last character with first
> > > increment i and decrement j and contibue the procedure
> > > continue the same till u get mid element :)
> >
> > > On Tue, Sep 6, 2011 at 12:56 PM, Atul Modi 
> wrote:
> >
> > >> can u remove letters also?as in the example 1 'o' seems to have
> been
> > >> removed?
> >
> > >> On Tue, Sep 6, 2011 at 12:25 PM, anshu mishra <
> anshumishra6...@gmail.com>wrote:
> >
> > >>>http://www.spoj.pl/problems/AIBOHP/
> >
> > >>> same problem u have asked!!
> > >>>  --
> > >>> You received this message because you are subscribed to the Google
> Groups
> > >>> "Algorithm Geeks" group.
> > >>> To post to this group, send email to algogeeks@googlegroups.com.
> > >>> To unsubscribe from this group, send email to
> > >>> algogeeks+unsubscr...@googlegroups.com.
> > >>> For more options, visit this group at
> > >>>http://groups.google.com/group/algogeeks?hl=en.
> >
> > >> --
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "Algorithm Geeks" group.
> > >> To post to this group, send email to algogeeks@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >> algogeeks+unsubscr...@googlegroups.com.
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/algogeeks?hl=en.
> >
> > >  --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Algorithm Geeks" group.
> > > To post to this group, send email to algogeeks@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > algogeeks+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/algogeeks?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] java books???

2011-09-06 Thread md shaukat ali
nageshwar rao

On Tue, Sep 6, 2011 at 8:22 PM, Sandy  wrote:

> Java How To Program - Deitel & Deitel
>
>
> On Tue, Sep 6, 2011 at 5:38 PM, htross  wrote:
>
>> guys i need to prepare for java aptitude so please refer some
>> books..
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>
>
> --
>
> *Sandeep,*
>
> *“I believe in smart work, Believe Me”*
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] java books???

2011-09-06 Thread Sandy
Java How To Program - Deitel & Deitel

On Tue, Sep 6, 2011 at 5:38 PM, htross  wrote:

> guys i need to prepare for java aptitude so please refer some
> books..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 

*Sandeep,*

*“I believe in smart work, Believe Me”*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-06 Thread yamini gupta
partition the array using quick sort
and find the kth smallest or largest number


On Sep 6, 12:20 am, learner  wrote:
> @Dave,All So Can Anyone Provide The Working Code in Linear Time for
> the same ?
>
> Thanks
>
> On Sep 5, 6:41 pm, Dave  wrote:
>
>
>
>
>
>
>
> > @Sachin: Correct: in one quicksort pivoting pass, the array is
> > rearranged so that the pivot element is put in the correct spot, with
> > larger elements on the right and smaller ones on the left. Now, if the
> > pivot, a[p], is at location k, i.e. p = k, then you are done. If not,
> > do another quicksort on the correct side of p; i.e., either on a[0] to
> > a[p-1] or on a[p+1] to a[n-1], depending on whether k is less than p
> > or greater than p.
>
> > Dave
>
> > On Sep 5, 1:27 am, sachin goyal  wrote:
>
> > > PLEASE TELL ME HOW WE CAN USE QUICK SORT TO FIND THE ELEMENT
> > > BECAUSE IN QUICK SORT ONE ELEMENT IN SHIFT IN ITS RIGHT POSITION ALL LEFTS
> > > ARE SMALLER AND ALL RIGHT ARE BIG
>
> > > On Mon, Sep 5, 2011 at  POSIT11:55 AM, sachin goyal
> > > wrote:
>
> > > > PLEASE TELL HOW
>
> > > > On Sun, Sep 4, 2011 at 7:23 PM, sarath prasath 
> > > > wrote:
>
> > > >> another sol which i learned from my friend is
> > > >> think of heap sort...
>
> > > >> On Sun, Sep 4, 2011 at 6:28 PM, learner  
> > > >> wrote:
>
> > > >>> something I Know using quick sort randomization function we can find
> > > >>> kt smallest/largest in unsorted array , but i am not able to write
> > > >>> code , please help me in this and provide the code for the same.?
>
> > > >>> Thanks
> > > >>> Nimish K.
> > > >>> 1st Year
> > > >>> IITR
>
> > > >>> --
> > > >>> You received this message because you are subscribed to the Google 
> > > >>> Groups
> > > >>> "Algorithm Geeks" group.
> > > >>> To post to this group, send email to algogeeks@googlegroups.com.
> > > >>> To unsubscribe from this group, send email to
> > > >>> algogeeks+unsubscr...@googlegroups.com.
> > > >>> For more options, visit this group at
> > > >>>http://groups.google.com/group/algogeeks?hl=en.
>
> > > >>  --
> > > >> You received this message because you are subscribed to the Google 
> > > >> Groups
> > > >> "Algorithm Geeks" group.
> > > >> To post to this group, send email to algogeeks@googlegroups.com.
> > > >> To unsubscribe from this group, send email to
> > > >> algogeeks+unsubscr...@googlegroups.com.
> > > >> For more options, visit this group at
> > > >>http://groups.google.com/group/algogeeks?hl=en.-Hidequoted text -
>
> > > - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: convert a word into a palindrome with minimum addition of letters to it

2011-09-06 Thread yamini gupta
add all the characters present in the string in reversed order to the
string

On Sep 6, 1:26 pm, surender sanke  wrote:
> @sukran, string shouldn't be replaced, only addition of characters allowed
>
> On Tue, Sep 6, 2011 at 1:48 PM, sukran dhawan wrote:
>
>
>
>
>
>
>
> > my soln works without increasing the string length
>
> > just start with first and last character copy last character with first
> > increment i and decrement j and contibue the procedure
> > continue the same till u get mid element :)
>
> > On Tue, Sep 6, 2011 at 12:56 PM, Atul Modi  wrote:
>
> >> can u remove letters also?as in the example 1 'o' seems to have been
> >> removed?
>
> >> On Tue, Sep 6, 2011 at 12:25 PM, anshu mishra 
> >> wrote:
>
> >>>http://www.spoj.pl/problems/AIBOHP/
>
> >>> same problem u have asked!!
> >>>  --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Algorithm Geeks" group.
> >>> To post to this group, send email to algogeeks@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> algogeeks+unsubscr...@googlegroups.com.
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/algogeeks?hl=en.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Algorithm Geeks" group.
> >> To post to this group, send email to algogeeks@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> algogeeks+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/algogeeks?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Stack problem

2011-09-06 Thread Dave
@Prem: The approach has been discussed in previous posts in this
thread, so there is no need for Shravan to repeat it. Please follow
your own advice and tell what problem shows up with the sample input.

Dave

On Sep 6, 8:26 am, Prem Krishna Chettri  wrote:
> @ Shravan :-  Thank for the Code but there are couple of issue with that..
>
>                      1> Please try to provide the algo approach. Coz I feel
> here we discuss irrespective of language , the technique of approach.
>                      2> Your Code implementation of whatever your approach
> is WRONG..
>
>                                  Please Run through these sample Inputs
> Values :-  233556263
>
>                          You need to make grow both the
> stack Simultaneously.
>
>    Well Guys the Algo I presented above is my understanding as I feel its
> simple topic being highly exaggerated. Please feel free to break it if I
> have missed something..
>
>
>
> On Tue, Sep 6, 2011 at 6:26 PM, Shravan Kumar  wrote:
> > void push(int num){
> >     if(stk1.isEmpty()){
> >         stk1.push(num);
> >         stk2.push(num);
> >      }
> >    else{
> >        if(num>stk2.top())stk1.push(num);
> >        else{stk1.push(num);stk2.push(num)}
> >   }
> > }
>
> > int pop(){
> >     int num=stk1.pop();
> >     if(num==stk2.top())stk2.pop();
> >     return num;
> > }
>
> > On Tue, Sep 6, 2011 at 6:12 PM, Prem Krishna Chettri 
> > wrote:
>
> >> Guys What the Issue Here?? I think its straight forward.
>
> >> If I hv two Stack
> >>    First :-  Keep pushing and Popping the incoming values
> >>    Second :- Keeping track of the so far min element in the First Stack.
>
> >> Now maintaining second stack is bit tricky.
> >>               PUSH :-  If the element is first element Push the Same
> >> element in Second Stack what we Pushed in Stack 1.
> >>                             Else compare the last Second.top with Current
> >> Element
> >>                                               Push which ever
> >> is smaller (or Equal).
>
> >>              POP :-  POP both the stack simultaneously.
>
> >> On Tue, Sep 6, 2011 at 5:52 PM, Don  wrote:
>
> >>> @HARISH:
> >>> Push 20 1 3 1 5 1 6 1 2 1
> >>> Pop
>
> >>> Now in your algorithm min will return 20, even though 1 and 3 and
> >>> other smaller numbers are still in the stack.
>
> >>> Don
>
> >>> On Sep 6, 6:25 am, "HARISH S.C"  wrote:
> >>> > Have a separate stack for minimum. While pushing, insert the number in
> >>> > minimum stack only if the given number is less that or equal to the
> >>> number @
> >>> > the top of min stack. While removing, remove the value from min stack
> >>> only
> >>> > if its equal to the value thats popped.
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Algorithm Geeks" group.
> >>> To post to this group, send email to algogeeks@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> algogeeks+unsubscr...@googlegroups.com.
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/algogeeks?hl=en.
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "Algorithm Geeks" group.
> >> To post to this group, send email to algogeeks@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> algogeeks+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/algogeeks?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Stack problem

2011-09-06 Thread Dave
@Shravan: Push can be written more compactly as

void push(int num)
{
stk1.push(num);
if(stk2.isEmpty() || num<=stk2.top())
stk2.push(num);
}

Then don't forget min:

int min()
{
return stk2.top();
}

Dave

On Sep 6, 7:56 am, Shravan Kumar  wrote:
> void push(int num){
>     if(stk1.isEmpty()){
>         stk1.push(num);
>         stk2.push(num);
>      }
>    else{
>        if(num>stk2.top())stk1.push(num);
>        else{stk1.push(num);stk2.push(num)}
>   }
>
> }
>
> int pop(){
>     int num=stk1.pop();
>     if(num==stk2.top())stk2.pop();
>     return num;
>
> }
>
> On Tue, Sep 6, 2011 at 6:12 PM, Prem Krishna Chettri 
> wrote:
>
>
>
> > Guys What the Issue Here?? I think its straight forward.
>
> > If I hv two Stack
> >    First :-  Keep pushing and Popping the incoming values
> >    Second :- Keeping track of the so far min element in the First Stack.
>
> > Now maintaining second stack is bit tricky.
> >               PUSH :-  If the element is first element Push the Same
> > element in Second Stack what we Pushed in Stack 1.
> >                             Else compare the last Second.top with Current
> > Element
> >                                               Push which ever
> > is smaller (or Equal).
>
> >              POP :-  POP both the stack simultaneously.
>
> > On Tue, Sep 6, 2011 at 5:52 PM, Don  wrote:
>
> >> @HARISH:
> >> Push 20 1 3 1 5 1 6 1 2 1
> >> Pop
>
> >> Now in your algorithm min will return 20, even though 1 and 3 and
> >> other smaller numbers are still in the stack.
>
> >> Don
>
> >> On Sep 6, 6:25 am, "HARISH S.C"  wrote:
> >> > Have a separate stack for minimum. While pushing, insert the number in
> >> > minimum stack only if the given number is less that or equal to the
> >> number @
> >> > the top of min stack. While removing, remove the value from min stack
> >> only
> >> > if its equal to the value thats popped.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Algorithm Geeks" group.
> >> To post to this group, send email to algogeeks@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> algogeeks+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/algogeeks?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: SEEK advice very urgent

2011-09-06 Thread Vipin Vishvkarma
On Tue, Sep 6, 2011 at 9:21 AM, Vipin Vishvkarma wrote:

>
> On Thu, Sep 1, 2011 at 12:32 PM, raj kumar wrote:
>
>> I am from Delhi College of Engineering[now DTU] i don't think it's on us
>> to chose the location where we want to work , they will ask our preferences
>> if possible then only they will send us to singapore otherwise  we will have
>> to go tokyo...
>> By the way is there anyone else who have cleared the exam  please reply
>> asap
>>
>> thanks friends
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
> @raj
> Can you please tell me something abt there written test. They are also
> coming in our college.
>
> *Regards,*
> *Vipin Vishvkarma*
> *M.Tech, IIT Bombay*
> *
> *
>
>
@raj
Can you please tell me something abt their written test. They are also
coming in our college.

-- 
*Regards,*
*Vipin Vishvkarma*
*M.Tech,IIT Bombay*
*
*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Stack problem

2011-09-06 Thread Prem Krishna Chettri
@ Shravan :-  Thank for the Code but there are couple of issue with that..

 1> Please try to provide the algo approach. Coz I feel
here we discuss irrespective of language , the technique of approach.
 2> Your Code implementation of whatever your approach
is WRONG..

 Please Run through these sample Inputs
Values :-  233556263

 You need to make grow both the
stack Simultaneously.



   Well Guys the Algo I presented above is my understanding as I feel its
simple topic being highly exaggerated. Please feel free to break it if I
have missed something..


On Tue, Sep 6, 2011 at 6:26 PM, Shravan Kumar  wrote:

> void push(int num){
> if(stk1.isEmpty()){
> stk1.push(num);
> stk2.push(num);
>  }
>else{
>if(num>stk2.top())stk1.push(num);
>else{stk1.push(num);stk2.push(num)}
>   }
> }
>
> int pop(){
> int num=stk1.pop();
> if(num==stk2.top())stk2.pop();
> return num;
> }
>
> On Tue, Sep 6, 2011 at 6:12 PM, Prem Krishna Chettri 
> wrote:
>
>> Guys What the Issue Here?? I think its straight forward.
>>
>> If I hv two Stack
>>First :-  Keep pushing and Popping the incoming values
>>Second :- Keeping track of the so far min element in the First Stack.
>>
>>
>> Now maintaining second stack is bit tricky.
>>   PUSH :-  If the element is first element Push the Same
>> element in Second Stack what we Pushed in Stack 1.
>> Else compare the last Second.top with Current
>> Element
>>   Push which ever
>> is smaller (or Equal).
>>
>>  POP :-  POP both the stack simultaneously.
>>
>>
>>
>>
>> On Tue, Sep 6, 2011 at 5:52 PM, Don  wrote:
>>
>>> @HARISH:
>>> Push 20 1 3 1 5 1 6 1 2 1
>>> Pop
>>>
>>> Now in your algorithm min will return 20, even though 1 and 3 and
>>> other smaller numbers are still in the stack.
>>>
>>> Don
>>>
>>> On Sep 6, 6:25 am, "HARISH S.C"  wrote:
>>> > Have a separate stack for minimum. While pushing, insert the number in
>>> > minimum stack only if the given number is less that or equal to the
>>> number @
>>> > the top of min stack. While removing, remove the value from min stack
>>> only
>>> > if its equal to the value thats popped.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: SEEK advice very urgent

2011-09-06 Thread Vipin Vishvkarma
On Thu, Sep 1, 2011 at 12:32 PM, raj kumar  wrote:

> I am from Delhi College of Engineering[now DTU] i don't think it's on us to
> chose the location where we want to work , they will ask our preferences if
> possible then only they will send us to singapore otherwise  we will have to
> go tokyo...
> By the way is there anyone else who have cleared the exam  please reply
> asap
>
> thanks friends
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>


@raj
Can you please tell me something abt there written test. They are also
coming in our college.

*Regards,*
*Vipin Vishvkarma*
*M.Tech, IIT Bombay*
*
*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] java books???

2011-09-06 Thread htross
guys i need to prepare for java aptitude so please refer some
books..

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] virtual memory

2011-09-06 Thread Piyush Grover
it's a subjective question.

If you have 100GB of main memory and 2  GB of virtual memory and you are
running very light weight programs then
nothing will happen. The system memory has enough space to take care of all
the applications but if your system is heavily loaded with
processes then it would cause the issues of improper swapping of the
instructions under execution.For more details, go through it:

http://faq.programmerworld.net/ms_windows/virtual-memory.html

On Tue, Sep 6, 2011 at 6:27 PM, Aman Kumar  wrote:

> Hii
>
> what happen if " size of main memory is greater than size of virtual
> memory"?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] virtual memory

2011-09-06 Thread Aman Kumar
Hii

what happen if " size of main memory is greater than size of virtual
memory"?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Stack problem

2011-09-06 Thread Shravan Kumar
void push(int num){
if(stk1.isEmpty()){
stk1.push(num);
stk2.push(num);
 }
   else{
   if(num>stk2.top())stk1.push(num);
   else{stk1.push(num);stk2.push(num)}
  }
}

int pop(){
int num=stk1.pop();
if(num==stk2.top())stk2.pop();
return num;
}

On Tue, Sep 6, 2011 at 6:12 PM, Prem Krishna Chettri wrote:

> Guys What the Issue Here?? I think its straight forward.
>
> If I hv two Stack
>First :-  Keep pushing and Popping the incoming values
>Second :- Keeping track of the so far min element in the First Stack.
>
>
> Now maintaining second stack is bit tricky.
>   PUSH :-  If the element is first element Push the Same
> element in Second Stack what we Pushed in Stack 1.
> Else compare the last Second.top with Current
> Element
>   Push which ever
> is smaller (or Equal).
>
>  POP :-  POP both the stack simultaneously.
>
>
>
>
> On Tue, Sep 6, 2011 at 5:52 PM, Don  wrote:
>
>> @HARISH:
>> Push 20 1 3 1 5 1 6 1 2 1
>> Pop
>>
>> Now in your algorithm min will return 20, even though 1 and 3 and
>> other smaller numbers are still in the stack.
>>
>> Don
>>
>> On Sep 6, 6:25 am, "HARISH S.C"  wrote:
>> > Have a separate stack for minimum. While pushing, insert the number in
>> > minimum stack only if the given number is less that or equal to the
>> number @
>> > the top of min stack. While removing, remove the value from min stack
>> only
>> > if its equal to the value thats popped.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Stack problem

2011-09-06 Thread Prem Krishna Chettri
Guys What the Issue Here?? I think its straight forward.

If I hv two Stack
   First :-  Keep pushing and Popping the incoming values
   Second :- Keeping track of the so far min element in the First Stack.


Now maintaining second stack is bit tricky.
  PUSH :-  If the element is first element Push the Same element
in Second Stack what we Pushed in Stack 1.
Else compare the last Second.top with Current
Element
  Push which ever is smaller (or
Equal).

 POP :-  POP both the stack simultaneously.




On Tue, Sep 6, 2011 at 5:52 PM, Don  wrote:

> @HARISH:
> Push 20 1 3 1 5 1 6 1 2 1
> Pop
>
> Now in your algorithm min will return 20, even though 1 and 3 and
> other smaller numbers are still in the stack.
>
> Don
>
> On Sep 6, 6:25 am, "HARISH S.C"  wrote:
> > Have a separate stack for minimum. While pushing, insert the number in
> > minimum stack only if the given number is less that or equal to the
> number @
> > the top of min stack. While removing, remove the value from min stack
> only
> > if its equal to the value thats popped.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Stack problem

2011-09-06 Thread Don
@HARISH:
Push 20 1 3 1 5 1 6 1 2 1
Pop

Now in your algorithm min will return 20, even though 1 and 3 and
other smaller numbers are still in the stack.

Don

On Sep 6, 6:25 am, "HARISH S.C"  wrote:
> Have a separate stack for minimum. While pushing, insert the number in
> minimum stack only if the given number is less that or equal to the number @
> the top of min stack. While removing, remove the value from min stack only
> if its equal to the value thats popped.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: macro

2011-09-06 Thread Dave
@Mohit: If n is a power of 2, then the macro returns x if x is a
multiple of n or x rounded up to the next multiple of n if x is not a
multiple of n. E.g., ROUNDUP(16,4) = 16 and ROUNDUP(17,4) = 20. The
result doesn't appear useful if n is not a power of 2.

Since ~(n-1) = -n, it could be written more compactly as

 #define ROUNDUP(x,n) ((x+n-1)&(-(n)))

Dave

On Sep 6, 5:06 am, Mohit Goel  wrote:
>  #define ROUNDUP(x,n) ((x+n-1)&(~(n-1)))
>
> what does the following macro do 

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: DE shaw question- urgent

2011-09-06 Thread sumit kumar pathak
*lol
*regards
- Sumit Kumar Pathak
(Sumit/ Pathak/ SKP ...)
*Smile is only good contagious thing.*
*Spread it*!



On Tue, Sep 6, 2011 at 4:51 PM, siva viknesh  wrote:

> @parth U r banned 
>
> On Sep 6, 3:47 pm, parth panchal  wrote:
> > hi neha how are you send me a nice mail of nature plz reply me i m online
> > now
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Stack problem

2011-09-06 Thread HARISH S.C
Have a separate stack for minimum. While pushing, insert the number in
minimum stack only if the given number is less that or equal to the number @
the top of min stack. While removing, remove the value from min stack only
if its equal to the value thats popped.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Algo Book

2011-09-06 Thread Neha Gupta
thnx to all :)

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Algo Book

2011-09-06 Thread Manikanta Babu
The Algorithm Design Manual is the best book you can refer. But its not for
beginners.

Cheers,
Mani

On Tue, Sep 6, 2011 at 4:09 PM, siddharam suresh wrote:

> @neha: there is site calledhttp://library.nu
> register there, u'll get majority of the books.
> Thank you,
> Sid.
>
>
>
> On Tue, Sep 6, 2011 at 3:54 PM, Prashant Kulkarni <
> prashant.r.k...@gmail.com> wrote:
>
>> "The Algorithm Design Manual" By Steve S. Skiena
>> -- Prashant Kulkarni
>>
>>
>>
>>
>> On Tue, Sep 6, 2011 at 3:48 PM, Udit Gupta wrote:
>>
>>> Fundamentals of Computer Algorithms by Sartaj Sahni
>>>
>>> On Tue, Sep 6, 2011 at 3:45 PM, Neha Gupta  wrote:
>>>
 hey guys , do tell me a book for algo( other than cormen)  with good no.
 of illustrations or any resource or link on net(especially for dp,
 backtracking, np problems  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@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Thanks & Regards,
Mani
http://www.sanidapa.com - The music Search engine

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Algo Book

2011-09-06 Thread Neha Gupta
thanku sid :)

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



  1   2   >