[algogeeks] Problem

2011-05-11 Thread Harshit Gangal
How can we calculate the number of divisors a number have in minimum time or
having minimum Time Complexity.

-- 
Harshit Gangal
Fourth Year Undergraduate Student
Dept. of Computer Science
JIIT, Noida , India

-- 
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] Do you Think Allocating memory to 2D Array is easy ???

2011-04-29 Thread Harshit Gangal
Suppose array is of A[N][M]

then

int **A = (int **) malloc(N*M * sizeof(int *) );

On Fri, Apr 29, 2011 at 6:00 PM, bittu  wrote:

> Basically we have to implement  function  which allocates memory to a
> two dimensional array. we have to Minimize the number of calls to
> malloc and make sure that the memory is accessible by the notation
> arr[i][j].
>
> .important part of the question is we have to implement the it using
> single call to MALLOC..its strictly means only 1 time ?? so make sure
> your not calling malloc more then 1 so lets make our hand dirty..??
>
> Please Read Question Carefully...
>
>
>
>
>
> Thanks & Regrads
> Shashank
>
> --
> 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.
>
>


-- 
Harshit Gangal
Fourth Year Undergraduate Student
Dept. of Computer Science
JIIT, Noida , India

-- 
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] [brain teaser ] Identical Twin Puzzle 19april

2011-04-20 Thread Harshit Gangal
On Wed, Apr 20, 2011 at 8:09 PM, arjoo kumar <2009ar...@gmail.com> wrote:

> *date of birth are same but birth's time is different*
>
>  STILL they remains twin..
they were triplets

>
> On Tue, Apr 19, 2011 at 1:30 AM, Lavesh Rawat wrote:
>
>> *  Identical Twin Puzzle
>>
>>  Two women apply for a job. They are identical. They have the same
>> mother, father and birthday. The interviewer asks, 'Are you twins?' to which
>> they honestly reply, 'No'.
>>
>> How is this possible?
>> *
>> *Update Your Answers at* : Click 
>> Here<http://dailybrainteaser.blogspot.com/2011/04/identical-twin-puzzle-19april.html?lavesh=lavesh>
>>
>> Solution:
>> Will be updated after 1 day
>>
>>
>> --
>>
>> "Never explain yourself. Your friends don’t need it
>> and your enemies won’t believe it" .
>>
>> --
>> 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.
>



-- 
Harshit Gangal
Fourth Year Undergraduate Student
Dept. of Computer Science
JIIT, Noida , India

-- 
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] [brain teaser] Trick Teaser Puzzle 20april

2011-04-20 Thread Harshit Gangal
comb. all the words she like are using silent alphabets. :D

On Wed, Apr 20, 2011 at 1:25 PM, Lavesh Rawat wrote:

> * Trick Teaser Puzzle
>
>  Rhonda will go see ballet but not opera. Her favorite number is eight and
> she doesn't like nine. She likes salmon but not trout. She hates Mondays but
> likes Wednesdays. Does she use a comb or a brush?
>
> *
> *Update Your Answers at* : Click 
> Here<http://dailybrainteaser.blogspot.com/2011/04/trick-teaser-puzzle-20april.html?lavesh=lavesh>
>
> Solution:
> Will be updated after 1 day
>
>
> --
>
> "Never explain yourself. Your friends don’t need it and
> your enemies won’t believe it" .
>
> --
> 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.
>



-- 
Harshit Gangal
Fourth Year Undergraduate Student
Dept. of Computer Science
JIIT, Noida , India

-- 
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: recursion

2011-04-15 Thread Harshit Gangal
there are two if statements and not an id else statement.
so in first case a is modified and then next if statement is checked against
b>a
whereas in 2nd case a is not modified and checkd with the same value for the
second if statement

On Fri, Apr 15, 2011 at 8:39 PM, priya mehta wrote:

> http://www.ideone.com/IKM57
>
> http://www.ideone.com/PmJ7A
> there is a minor change between the codes
> one works another doesn't
> someone please tell the reason
>
> On Fri, Apr 15, 2011 at 8:38 PM, priya mehta wrote:
>
>> http://www.ideone.com/PmJ7A
>>
>>
>  --
> 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.
>



-- 
Harshit Gangal
Fourth Year Undergraduate Student
Dept. of Computer Science
JIIT, Noida , India

-- 
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] Amazon Question

2011-04-13 Thread Harshit Gangal
it 2*node and 2*node+1, if binary tree is stored in an array

On Thu, Apr 14, 2011 at 12:36 AM, Vishakha Parvatikar <
vishakha.parvati...@gmail.com> wrote:

> Given a binary tree, write a program to find the cousin nodes of the given
> node.
>
> --
> 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.
>



-- 
Harshit Gangal
Fourth Year Undergraduate Student
Dept. of Computer Science
JIIT, Noida , India

-- 
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.