Re: [algogeeks] Interview Question

2011-04-07 Thread Abhishek Mallick
@ your name last name : please read the question carefully.
*
*
*
*
On Fri, Apr 8, 2011 at 12:11 AM, your name last name wrote:

> Moving the data is unnecessary if in case the whole pointer shifting is
> meant for the entire node and not for individual elements of the node.
> temp ->next = ( temp -> next ) -> next
>
> the above statement is more than enough to remove the midlle node from the
> 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.
>

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

2011-04-07 Thread your name last name
Moving the data is unnecessary if in case the whole pointer shifting is
meant for the entire node and not for individual elements of the node.
temp ->next = ( temp -> next ) -> next

the above statement is more than enough to remove the midlle node from the
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.



[algogeeks] Oracle Financial Developer Needed in TX -- F2F Required

2011-04-07 Thread Leon Parker
Hello Folks,
Hope the day is treating you well!

Please go through the below requirement and let me know if you have any
consultant for the below position?

*Job Title: Oracle Financial Developer
Location: Houston, TX
Duration: 3+ Months*

Job Description:
Strong experience writing and supporting interfaces between Oracle EBS and
non-Oracle applications
Strong Oracle Reports experience writing new reports and enhancing existing
reports
Technical knowledge of Oracle Financials v11.5.10.2 (especially, AP, AR, PO,
order entry, inventory)
Experience using XML Publisher (BI Publisher)
Experience writing, reading and debugging PL/SQL code

Thanks
Leon Parker - l...@panzersolutions.com
203-983-9475

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

2011-04-07 Thread Anurag atri
@All
yeah my solution does move data ...
I am very interested in knowing a solution that moves no data , someone
please come up with a solution .

On Thu, Apr 7, 2011 at 9:23 PM, balaji a  wrote:

> lets say there are two pointers - temp1,temp2 and the start of the node is
> head
> now,
>   temp1=head;
>   temp2=head->next;
>
>  temp1->next=temp2->next;
>
>  now temp1 points to the first node and the temp2 points to the second
> node(which got deleted from the list).
>
>
> On Thu, Apr 7, 2011 at 5:43 PM, Umer Farooq  wrote:
>
>> That can be moved. Basically, he is trying to convey that move the data of
>> temp->next to temp. That's perfectly fine.
>>
>>
>> On Thu, Apr 7, 2011 at 2:05 PM, Akash Mukherjee wrote:
>>
>>> @ anurag
>>>
>>> temp -> data = ( temp -> next ) -> data ;
>>>
>>> but data cannot be moved, ryt??
>>>
>>> On 4/6/11, Anurag atri  wrote:
>>> > in case you are given a pointer to the first node simply do
>>> > temp ->next = ( temp -> next ) -> next .
>>> > if you are given a pointer to the second node do ,
>>> > temp -> data = ( temp -> next ) -> data ;
>>> > temp -> next = NULL ;
>>> >
>>> > correct me if I am wrong .
>>> >
>>> > On Mon, Apr 4, 2011 at 9:48 PM, Umer Farooq 
>>> wrote:
>>> >
>>> >> Hello friends,
>>> >>
>>> >> The following question has appeared in two top companies of my city.
>>> I'd
>>> >> appreciate if anyone is able to answer it.
>>> >>
>>> >> Given a singly liked list comprising of three nodes
>>> >>
>>> >> Delete the middle node such that:
>>> >>
>>> >> 1- A temp pointer is pointing to the first node
>>> >> 2- A temp pointer is pointing to the second node.
>>> >>
>>> >> You can not use any other pointer and you can not move data.
>>> >>
>>> >> --
>>> >> Umer
>>> >>
>>> >> --
>>> >> 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
>>> > Anurag Atri
>>> >
>>> > --
>>> > 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.
>>>
>>>
>>
>>
>> --
>> Umer
>>
>> --
>> 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.
>>
>
>
>
> --
> A.Balaji
>
>  --
> 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
Anurag Atri
II year
Computer Engineering
Delhi College Of Engineering

-- 
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 telephonic interview at Cisco

2011-04-07 Thread nitish goyal
If anyone had telephonic interview at cisco regarding summer internship,
then
please the experience asap. I am having this interview tomorrow.

-- 
Regards,
Nitish Goyal

-- 
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] Output of the code

2011-04-07 Thread Munish Goyal
Dude Umer. Now i think the output is clear to you.

Anyhow it is not appropriate to instigate in a worldwide group by putting in
such comments and that
too in a trivial (unsolicited, spam) question post.

I hope the moderator takes note of this.
On Mon, Mar 28, 2011 at 1:24 PM, Umer Farooq  wrote:

> btw, true is defined in cpp.
>
>
> On Mon, Mar 28, 2011 at 12:54 PM, Umer Farooq  wrote:
>
>> The compiler doesn't want to get killed like poor 
>> mani,
>> therfore it is giving a compiler error :P
>>
>>
>> On Mon, Mar 28, 2011 at 10:43 AM, balaji a wrote:
>>
>>> the code will give error as there is nothing called "true" defined.
>>>
>>> On Sun, Mar 27, 2011 at 10:38 PM, Umer Farooq wrote:
>>>
 Hi,

 Can anyone tell me the output of the following code?

 #include 

 int main()
 {
 .. if (true)
 .. cout << "Pakistan will win the WorldCup 2011\n";
 return 0;
 }

 --
 Umer

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

>>>
>>>
>>>
>>> --
>>> A.Balaji
>>>
>>>  --
>>> 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.
>>>
>>
>>
>>
>> --
>> Umer
>>
>
>
>
> --
> Umer
>
> --
> 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.
>



-- 
Munish

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

2011-04-07 Thread balaji a
lets say there are two pointers - temp1,temp2 and the start of the node is
head
now,
  temp1=head;
  temp2=head->next;

 temp1->next=temp2->next;

 now temp1 points to the first node and the temp2 points to the second
node(which got deleted from the list).

On Thu, Apr 7, 2011 at 5:43 PM, Umer Farooq  wrote:

> That can be moved. Basically, he is trying to convey that move the data of
> temp->next to temp. That's perfectly fine.
>
>
> On Thu, Apr 7, 2011 at 2:05 PM, Akash Mukherjee wrote:
>
>> @ anurag
>>
>> temp -> data = ( temp -> next ) -> data ;
>>
>> but data cannot be moved, ryt??
>>
>> On 4/6/11, Anurag atri  wrote:
>> > in case you are given a pointer to the first node simply do
>> > temp ->next = ( temp -> next ) -> next .
>> > if you are given a pointer to the second node do ,
>> > temp -> data = ( temp -> next ) -> data ;
>> > temp -> next = NULL ;
>> >
>> > correct me if I am wrong .
>> >
>> > On Mon, Apr 4, 2011 at 9:48 PM, Umer Farooq 
>> wrote:
>> >
>> >> Hello friends,
>> >>
>> >> The following question has appeared in two top companies of my city.
>> I'd
>> >> appreciate if anyone is able to answer it.
>> >>
>> >> Given a singly liked list comprising of three nodes
>> >>
>> >> Delete the middle node such that:
>> >>
>> >> 1- A temp pointer is pointing to the first node
>> >> 2- A temp pointer is pointing to the second node.
>> >>
>> >> You can not use any other pointer and you can not move data.
>> >>
>> >> --
>> >> Umer
>> >>
>> >> --
>> >> 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
>> > Anurag Atri
>> >
>> > --
>> > 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.
>>
>>
>
>
> --
> Umer
>
> --
> 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.
>



-- 
A.Balaji

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

2011-04-07 Thread pankaj agarwal
in fn1
ptr is pointer to integer i and you are changing content of i by using *ptr
from 10 to 100

in fn
ptr is pointer to integer i and you are changing pointer ptr by pointing to
val(now ptr no more point to integer i).so here only pointer is changing not
value.

am i clear to you?

On Fri, Apr 1, 2011 at 9:05 AM, navin  wrote:

> see this c code.
>
> #include
>
> void fn (int *ptr)
> {
>   const int val=100;
>   ptr=&val;
> }
> void fn1(int *ptr)
> {
>   *ptr = 100;
> }
>
> main()
> {
>   int i=10;
>   printf("%d ", i);
>   fn(&i);
>   printf("%d ", i);
>   fn1(&i);
>   printf("%d ", i);
> }
>
> What is the difference between fn and fn1?
> I expected the output to be 10 100 100
> but it came as 10 10 100.
> can anyone explain what happens in fn.
> why 100 in fn is not stored in ptr.
>
> --
> 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.
>
>


-- 
Pankaj Agarwal
B.Tech(Final Year Undergraduate)
Communication and Computer Engineering
LNMIIT,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] Interview Question

2011-04-07 Thread Kamakshii Aggarwal
1st case:
if ptr points to the first node, then ptr->next=(ptr->next)->next will do.

2nd case:i think tehre has to be movement of data from third node to
the second node.

On 4/4/11, Umer Farooq  wrote:
> Hello friends,
>
> The following question has appeared in two top companies of my city. I'd
> appreciate if anyone is able to answer it.
>
> Given a singly liked list comprising of three nodes
>
> Delete the middle node such that:
>
> 1- A temp pointer is pointing to the first node
> 2- A temp pointer is pointing to the second node.
>
> You can not use any other pointer and you can not move data.
>
> --
> Umer
>
> --
> 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,
Kamakshi
kamakshi...@gmail.com

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



Fwd: [algogeeks] [brain teaser ] 1april

2011-04-07 Thread Kamakshii Aggarwal
-- Forwarded message --
From: Kamakshii Aggarwal 
Date: Thu, Apr 7, 2011 at 8:56 PM
Subject: Re: [algogeeks] [brain teaser ] 1april
To: Manish Pathak 


@Manish:A can answer only if B and C have same colours.if B and C have
different colours A cannot answer..Hence B will answer.
therefore B is the answer.Hence two cases arises..sorry,my previous answer
was not totally correct.I missed out the other case.


On Thu, Apr 7, 2011 at 11:35 AM, Manish Pathak  wrote:

> Hi kamakshi
>   I think, kusum answer's is right, can u explain why A
> not???
>
>
> --
>
> Thanks and Regards,
>
> Manish Pathak **
> TimesJobs.com
> Mo.  9015687266
>  *http://manishpathak-mobile.blogspot.com/*
>



-- 
Regards,
Kamakshi
kamakshi...@gmail.com



-- 
Regards,
Kamakshi
kamakshi...@gmail.com

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

2011-04-07 Thread Kamakshii Aggarwal
in fn,ptr first recieves the address of i,and then by ptr=&val,it now stores
the address of val variable.

while in fn1,ptr first stores the address of i,and then by *ptr=100,value at
the address of i changes to 100.and hence it gives 100 as the answer.

On Thu, Apr 7, 2011 at 9:29 AM, rohit agarwal wrote:

> I fn we are simply changing the address in ptr means ptr will now points to
> another variable i.e val
>
> In fn1 we are changing the value of a variable to which ptr is pointing i.e
> i so i will be changed.
>
>  --
> 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,
Kamakshi
kamakshi...@gmail.com

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

2011-04-07 Thread Umer Farooq
So, is there any other way of doing this? I did it the way anurag did it;
but the interviewer asked me to do it without moving the data.

On Thu, Apr 7, 2011 at 6:38 PM, Abdul Rahman Shariff wrote:

> @akash ur rite u cannot move data there
>
>
> On Thu, Apr 7, 2011 at 2:35 PM, Akash Mukherjee wrote:
>
>> @ anurag
>>
>> temp -> data = ( temp -> next ) -> data ;
>>
>> but data cannot be moved, ryt??
>>
>> On 4/6/11, Anurag atri  wrote:
>> > in case you are given a pointer to the first node simply do
>> > temp ->next = ( temp -> next ) -> next .
>> > if you are given a pointer to the second node do ,
>> > temp -> data = ( temp -> next ) -> data ;
>> > temp -> next = NULL ;
>> >
>> > correct me if I am wrong .
>> >
>> > On Mon, Apr 4, 2011 at 9:48 PM, Umer Farooq 
>> wrote:
>> >
>> >> Hello friends,
>> >>
>> >> The following question has appeared in two top companies of my city.
>> I'd
>> >> appreciate if anyone is able to answer it.
>> >>
>> >> Given a singly liked list comprising of three nodes
>> >>
>> >> Delete the middle node such that:
>> >>
>> >> 1- A temp pointer is pointing to the first node
>> >> 2- A temp pointer is pointing to the second node.
>> >>
>> >> You can not use any other pointer and you can not move data.
>> >>
>> >> --
>> >> Umer
>> >>
>> >> --
>> >> 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
>> > Anurag Atri
>> >
>> > --
>> > 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.
>>
>>
>
>
> --
> Assalaam A'laykum wa Rahmatullahi Wa Barkatuhu
> Wa A'laykum Assalaam wa Rahmatullahi Wa Barkatuhu
> Ehab Abdul Rahman Shariff
>
> --
> 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.
>



-- 
Umer

-- 
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 ] 1april

2011-04-07 Thread Kamakshii Aggarwal
@Manish:A can answer only if B and C have same colours.if B and C have
different colours A cannot answer..Hence B will answer.
therefore B is the answer.Hence two cases arises..sorry,my previous answer
was not totally correct.I missed out the other case.


-- 
Regards,
Kamakshi
Netaji subhas Institute of technology.
kamakshi...@gmail.com

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

2011-04-07 Thread Umer Farooq
in the first case
temp ->next = ( temp -> next ) -> next .

The middle node will become orphan and it won't be deleted, I guess.

in second case
I did it the same way. Then he asked me to solve this without moving the
data?


On Wed, Apr 6, 2011 at 8:03 PM, Anurag atri wrote:

> in case you are given a pointer to the first node simply do
> temp ->next = ( temp -> next ) -> next .
> if you are given a pointer to the second node do ,
> temp -> data = ( temp -> next ) -> data ;
> temp -> next = NULL ;
>
> correct me if I am wrong .
>
> On Mon, Apr 4, 2011 at 9:48 PM, Umer Farooq  wrote:
>
>> Hello friends,
>>
>> The following question has appeared in two top companies of my city. I'd
>> appreciate if anyone is able to answer it.
>>
>> Given a singly liked list comprising of three nodes
>>
>> Delete the middle node such that:
>>
>> 1- A temp pointer is pointing to the first node
>> 2- A temp pointer is pointing to the second node.
>>
>> You can not use any other pointer and you can not move data.
>>
>> --
>> Umer
>>
>> --
>> 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
> Anurag Atri
>
> --
> 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.
>



-- 
Umer

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

2011-04-07 Thread Kamakshii Aggarwal
@anurag:the second case of yours requires movement of data if I am not
wrong...
@umer farooq:pls calrify what does movement of data mean?

On Wed, Apr 6, 2011 at 8:33 PM, Anurag atri wrote:

> in case you are given a pointer to the first node simply do
> temp ->next = ( temp -> next ) -> next .
> if you are given a pointer to the second node do ,
> temp -> data = ( temp -> next ) -> data ;
> temp -> next = NULL ;
>
> correct me if I am wrong .
>
> On Mon, Apr 4, 2011 at 9:48 PM, Umer Farooq  wrote:
>
>> Hello friends,
>>
>> The following question has appeared in two top companies of my city. I'd
>> appreciate if anyone is able to answer it.
>>
>> Given a singly liked list comprising of three nodes
>>
>> Delete the middle node such that:
>>
>> 1- A temp pointer is pointing to the first node
>> 2- A temp pointer is pointing to the second node.
>>
>> You can not use any other pointer and you can not move data.
>>
>> --
>> Umer
>>
>> --
>> 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
> Anurag Atri
>
>  --
> 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,
Kamakshi
kamakshi...@gmail.com

-- 
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: Interview Question

2011-04-07 Thread Umer Farooq
Anyone here who can answer this question?

On Mon, Apr 4, 2011 at 9:18 PM, Umer Farooq  wrote:

> Hello friends,
>
> The following question has appeared in two top companies of my city. I'd
> appreciate if anyone is able to answer it.
>
> Given a singly liked list comprising of three nodes
>
> Delete the middle node such that:
>
> 1- A temp pointer is pointing to the first node
> 2- A temp pointer is pointing to the second node.
>
> You can not use any other pointer and you can not move data.
>
> --
> Umer
>



-- 
Umer

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

2011-04-07 Thread Umer Farooq
That can be moved. Basically, he is trying to convey that move the data of
temp->next to temp. That's perfectly fine.

On Thu, Apr 7, 2011 at 2:05 PM, Akash Mukherjee  wrote:

> @ anurag
>
> temp -> data = ( temp -> next ) -> data ;
>
> but data cannot be moved, ryt??
>
> On 4/6/11, Anurag atri  wrote:
> > in case you are given a pointer to the first node simply do
> > temp ->next = ( temp -> next ) -> next .
> > if you are given a pointer to the second node do ,
> > temp -> data = ( temp -> next ) -> data ;
> > temp -> next = NULL ;
> >
> > correct me if I am wrong .
> >
> > On Mon, Apr 4, 2011 at 9:48 PM, Umer Farooq  wrote:
> >
> >> Hello friends,
> >>
> >> The following question has appeared in two top companies of my city. I'd
> >> appreciate if anyone is able to answer it.
> >>
> >> Given a singly liked list comprising of three nodes
> >>
> >> Delete the middle node such that:
> >>
> >> 1- A temp pointer is pointing to the first node
> >> 2- A temp pointer is pointing to the second node.
> >>
> >> You can not use any other pointer and you can not move data.
> >>
> >> --
> >> Umer
> >>
> >> --
> >> 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
> > Anurag Atri
> >
> > --
> > 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.
>
>


-- 
Umer

-- 
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 help in verifying the speed of this algorithm - factorizing or prime finder.

2011-04-07 Thread harish
Hi All,

I got a reply at another forum; here is the link for that
http://stackoverflow.com/questions/5581040/i-have-a-new-algorithm-to-find-factors-or-primes-in-linear-time-need-verificati

.. Don i believe you are correct.

Thanks
Harish

On Apr 7, 4:56 pm, harish  wrote:
> Hi Don, I reposting my reply to you to all now..
>
> The GNFS mentioned here is polynomial time as I got to understand from
> wikipedia. I claim that the above algorithm is linear time.
>
> I putting the proof here for correctness and linear time (warning its
> big and messy). Also this one applies to the algorithm given in the
> blog:http://randomoneness.blogspot.com/2011/04/algorithm-to-find-factors-o...
>
> (The above given is a faster version of the one given in my blog)
>
> Analysis of algorithms:
>
> In below proof used:
> Operation A is:  While r is smaller than mL then, mL can be
> decremented by one and the new r can be computed as r + mR.
> As taking out one mL, means one mR is send to remainder. (first inner
> while loop)
> Operation B is:  While r is bigger than mL, then mL can be taken out
> from r and this basically increases mR by one. (2nd inner while loop)
> Operation C is:  Operations A and B can be repeated till, r not equals
> mL. When we arrive at the results, Operation C is
> exited. (main while loop)
>
> 1. Proof of correctness: If the number is a perfect square root then,
> the answer is found when square root is found.
> For more reading on Square root refer:http://en.wikipedia.org/wiki/Square_root
> Else if the number is not a perfect square, then r is not equal to 0.
> Hence it enters the while loop.
> Operation A: While mL is greater than r, then mL is decremented by 1,
> and r is incremented by mR.
> The step is correct because, mL * mR means mR added mL times. If one
> is taken from mL, then mR is added
> (mL-1) times. So, one mR is added less, when taking one out of mL.
> This mR is added to r. – (1)
> Operation B: While mL is less than r, then mR is incremented by 1 and
> r is decremented by mL. This
> step is correct because, mL * mR means mL added mR times. If one is
> added to mR, then mL is added (mR + 1)
> times in mL*mR. So if mR is incremented by 1, then to equate to N, mL
> can be taken away from r the
> remainder. – (2)
> Operation C: Operation A and B are repeated till mL is equal to r.
> This leads to the answer because:
> We start from the approximate square root of the number. As operation
> A and B, calculates the remainder r,
> when the factors are mL and mR. Operation A never leads to the answer
> as, r + mR is always greater than mL,
> as mL is smaller than mR. Operation B, leads to the answer. If for any
> case mL is a factor, then, when r is
> reduced by mL in operation B to mL (r becomes a factor of mL). As
> Operation A and B are correct (refer 1 and
> 2), if there is a factor then this leads to r to be zero. And before r
> becomes zero, r should be equal to mL. At this
> point the answer is found.
>
> 2. Proof that the number of Operations required is linear: Let’s take
> only the case of numbers which are not
> perfect squares.
> The algorithm consists of basic operations, of addition, subtraction
> and comparison. Let’s see how
> many times a different while loops are invoked.
> We take mL as nearest square root. And take mR > mL.
> There for Operation A is invoked only once during one iteration of the
> Operation C. This is because, by
> incrementing r by mR, increases r to be greater than mL (mR > mL) and
> hence invalidates the loop condition.
> The basic number of steps in Operation A is 3: 1. While loop
> evaluation, 2. decrement mL by 1 and 3. Increment
> r by mR.
> Operation B is repeated to find a r which is greater than mL. As mR
> varies as algorithm progress, its
> hard to calculate number of time r Operation B is repeated. The basic
> number of steps in Operation B is 3: 1.
> while loop evaluation, 2. Increment mR by 1 and 3. Decrement r by mL.
> However two things are certain, for worst case scenario i.e. N is
> prime number, mL is reduced to 1 and
> mR is incremented to N. From this we can conlude that, Operation B is
> repeated N-sqrt(N) times i.e. Increment
> mR to N from sqrt(N) and Operation A is repeated till mL becomes 1 i.e
> from sqrt(N) to 1. Based on this the
> number of steps required is:
> Operation B : N – sqrt(N)
> Operation A : sqrt(N)
> And the Operation C, which apart from the steps we calculate from
> Operation A and Operation B, will
> have 2 basic steps; 1. the main while evaluation, 2. the exit
> evaluation of one of the while either of Operation A
> or B; during each loop execution. Operation C is called maximum of N
> times in worst case, as its sum of
> number of times Operation A and B = (N- sqrt(N) + sqrt(N) = N.
> The total number of steps is:
> => Operation B + Operation A + Operation C
> => (N – sqrt(N))* 3 + sqrt(N) * 3 + 2*N
> => 3*N+ 2*N
> => 5*N
> Hence the total number of steps is 5*N in worst case and lesser in all
> other cases.
>

Re: [algogeeks] Interview Question

2011-04-07 Thread Abdul Rahman Shariff
@akash ur rite u cannot move data there

On Thu, Apr 7, 2011 at 2:35 PM, Akash Mukherjee  wrote:

> @ anurag
>
> temp -> data = ( temp -> next ) -> data ;
>
> but data cannot be moved, ryt??
>
> On 4/6/11, Anurag atri  wrote:
> > in case you are given a pointer to the first node simply do
> > temp ->next = ( temp -> next ) -> next .
> > if you are given a pointer to the second node do ,
> > temp -> data = ( temp -> next ) -> data ;
> > temp -> next = NULL ;
> >
> > correct me if I am wrong .
> >
> > On Mon, Apr 4, 2011 at 9:48 PM, Umer Farooq  wrote:
> >
> >> Hello friends,
> >>
> >> The following question has appeared in two top companies of my city. I'd
> >> appreciate if anyone is able to answer it.
> >>
> >> Given a singly liked list comprising of three nodes
> >>
> >> Delete the middle node such that:
> >>
> >> 1- A temp pointer is pointing to the first node
> >> 2- A temp pointer is pointing to the second node.
> >>
> >> You can not use any other pointer and you can not move data.
> >>
> >> --
> >> Umer
> >>
> >> --
> >> 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
> > Anurag Atri
> >
> > --
> > 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.
>
>


-- 
Assalaam A'laykum wa Rahmatullahi Wa Barkatuhu
Wa A'laykum Assalaam wa Rahmatullahi Wa Barkatuhu
Ehab Abdul Rahman Shariff

-- 
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 help in verifying the speed of this algorithm - factorizing or prime finder.

2011-04-07 Thread harish
Hi Don, I reposting my reply to you to all now..

The GNFS mentioned here is polynomial time as I got to understand from
wikipedia. I claim that the above algorithm is linear time.

I putting the proof here for correctness and linear time (warning its
big and messy). Also this one applies to the algorithm given in the
blog: 
http://randomoneness.blogspot.com/2011/04/algorithm-to-find-factors-or-primes-in.html

(The above given is a faster version of the one given in my blog)

Analysis of algorithms:

In below proof used:
Operation A is:  While r is smaller than mL then, mL can be
decremented by one and the new r can be computed as r + mR.
As taking out one mL, means one mR is send to remainder. (first inner
while loop)
Operation B is:  While r is bigger than mL, then mL can be taken out
from r and this basically increases mR by one. (2nd inner while loop)
Operation C is:  Operations A and B can be repeated till, r not equals
mL. When we arrive at the results, Operation C is
exited. (main while loop)

1. Proof of correctness: If the number is a perfect square root then,
the answer is found when square root is found.
For more reading on Square root refer: http://en.wikipedia.org/wiki/Square_root
Else if the number is not a perfect square, then r is not equal to 0.
Hence it enters the while loop.
Operation A: While mL is greater than r, then mL is decremented by 1,
and r is incremented by mR.
The step is correct because, mL * mR means mR added mL times. If one
is taken from mL, then mR is added
(mL-1) times. So, one mR is added less, when taking one out of mL.
This mR is added to r. – (1)
Operation B: While mL is less than r, then mR is incremented by 1 and
r is decremented by mL. This
step is correct because, mL * mR means mL added mR times. If one is
added to mR, then mL is added (mR + 1)
times in mL*mR. So if mR is incremented by 1, then to equate to N, mL
can be taken away from r the
remainder. – (2)
Operation C: Operation A and B are repeated till mL is equal to r.
This leads to the answer because:
We start from the approximate square root of the number. As operation
A and B, calculates the remainder r,
when the factors are mL and mR. Operation A never leads to the answer
as, r + mR is always greater than mL,
as mL is smaller than mR. Operation B, leads to the answer. If for any
case mL is a factor, then, when r is
reduced by mL in operation B to mL (r becomes a factor of mL). As
Operation A and B are correct (refer 1 and
2), if there is a factor then this leads to r to be zero. And before r
becomes zero, r should be equal to mL. At this
point the answer is found.

2. Proof that the number of Operations required is linear: Let’s take
only the case of numbers which are not
perfect squares.
The algorithm consists of basic operations, of addition, subtraction
and comparison. Let’s see how
many times a different while loops are invoked.
We take mL as nearest square root. And take mR > mL.
There for Operation A is invoked only once during one iteration of the
Operation C. This is because, by
incrementing r by mR, increases r to be greater than mL (mR > mL) and
hence invalidates the loop condition.
The basic number of steps in Operation A is 3: 1. While loop
evaluation, 2. decrement mL by 1 and 3. Increment
r by mR.
Operation B is repeated to find a r which is greater than mL. As mR
varies as algorithm progress, its
hard to calculate number of time r Operation B is repeated. The basic
number of steps in Operation B is 3: 1.
while loop evaluation, 2. Increment mR by 1 and 3. Decrement r by mL.
However two things are certain, for worst case scenario i.e. N is
prime number, mL is reduced to 1 and
mR is incremented to N. From this we can conlude that, Operation B is
repeated N-sqrt(N) times i.e. Increment
mR to N from sqrt(N) and Operation A is repeated till mL becomes 1 i.e
from sqrt(N) to 1. Based on this the
number of steps required is:
Operation B : N – sqrt(N)
Operation A : sqrt(N)
And the Operation C, which apart from the steps we calculate from
Operation A and Operation B, will
have 2 basic steps; 1. the main while evaluation, 2. the exit
evaluation of one of the while either of Operation A
or B; during each loop execution. Operation C is called maximum of N
times in worst case, as its sum of
number of times Operation A and B = (N- sqrt(N) + sqrt(N) = N.
The total number of steps is:
=> Operation B + Operation A + Operation C
=> (N – sqrt(N))* 3 + sqrt(N) * 3 + 2*N
=> 3*N+ 2*N
=> 5*N
Hence the total number of steps is 5*N in worst case and lesser in all
other cases.
However, in normal computers as the input size increases the time
taken to do addition, subtraction and
comparison varies. As the input size increases above the size of
computers word size, the number of operations
required for the computing basic steps are higher. But for a given
arbitrarily large number (higher than computer
word size), the time taken for each basic operation would be fixed,
even though is larger than in case of smaller
number

[algogeeks] Please correct the error in my code

2011-04-07 Thread ankit sablok
I have debugged my program from all points of view but i cant find the
cause of a wrong answer for this problem

http://uva.onlinejudge.org/external/4/406.html

here is my source code for the problem

#include
#include
#include
#include
#include
#include
#include
#include

using namespace std;

#define pb push_back

vectorprime; // this vector will hold all the primes

inline int sieve()
{
  int i,j;

  for(i = 0; i <= 1000 ; i++)
  prime.pb(true);

  for(i = 2; i*i <= 1000 ; i++)
  {
 for(j = 2 ; i*j <= prime.size() ; j++ )
 prime[i*j] = false;
  }

  return 0;

}

int main()
{
int i,j,k;

sieve();

int N,C;

while( scanf("%d %d",&N,&C) == 2)
{

vectorprimes;

primes.pb(1);

for(i=2;i<=N;i++)
if(prime[i])
primes.pb(i);

vector::iterator p; // used for pointing to the vector

printf("%d %d: ",N,C);

if((primes.size())%2 == 0)
{
  if(C*2 >= primes.size())
  {
for(i=0;i= primes.size() )
{
  for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Interview Question

2011-04-07 Thread Akash Mukherjee
@ anurag

temp -> data = ( temp -> next ) -> data ;

but data cannot be moved, ryt??

On 4/6/11, Anurag atri  wrote:
> in case you are given a pointer to the first node simply do
> temp ->next = ( temp -> next ) -> next .
> if you are given a pointer to the second node do ,
> temp -> data = ( temp -> next ) -> data ;
> temp -> next = NULL ;
>
> correct me if I am wrong .
>
> On Mon, Apr 4, 2011 at 9:48 PM, Umer Farooq  wrote:
>
>> Hello friends,
>>
>> The following question has appeared in two top companies of my city. I'd
>> appreciate if anyone is able to answer it.
>>
>> Given a singly liked list comprising of three nodes
>>
>> Delete the middle node such that:
>>
>> 1- A temp pointer is pointing to the first node
>> 2- A temp pointer is pointing to the second node.
>>
>> You can not use any other pointer and you can not move data.
>>
>> --
>> Umer
>>
>> --
>> 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
> Anurag Atri
>
> --
> 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] [brain teaser ] 7april

2011-04-07 Thread vaibhav shukla
The man will take a log of wood , lit it with the fire.
now consider three region of the forest , the west from where the fire is
coming, the middle one where the man is standing and the east part.
now man will lit up the middle region also.Now fire is coming from west to
middle and also the second one will go from middle to east.
as some of the middle region region gets burned up , the man will move and
stand in the burned region.and hence he can save himself as we know that
already  burned region will not catch fire again (Obviously the man must
have left some of the middle region unburned for himself before putting fire
in the middle region)
ex :

A..BC...e..D
A is at west from where the fire is coming. B is where the man is standing ,
C is where he puts the fire(the middle region) thus fire will go from A to C
and simultaneously from C to D (As some of the CD portion is burned up man
will move to e)

I think now no further explanation might be needed.

On Thu, Apr 7, 2011 at 4:40 AM, Carl Barton wrote:

> As the fire burns it will spread to the east but burn out in the west, so
> he can move to the west of the island?
>
>
> On 7 April 2011 08:57, your name last name  wrote:
>
>>
>> * Survive Fire in Island Puzzle  *
>>>
>>
>> Answer: The Man can escape the fire if he goes to the west corner of the
>> island... as the wind is blowing from the west , no fire will reach the west
>> corner
>>
>>  --
>> 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.
>



-- 
  best wishes!!
Vaibhav Shukla
DU-MCA

-- 
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 ] 7april

2011-04-07 Thread Carl Barton
As the fire burns it will spread to the east but burn out in the west, so he
can move to the west of the island?

On 7 April 2011 08:57, your name last name  wrote:

>
> * Survive Fire in Island Puzzle  *
>>
>
> Answer: The Man can escape the fire if he goes to the west corner of the
> island... as the wind is blowing from the west , no fire will reach the west
> corner
>
>  --
> 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: 28march

2011-04-07 Thread Carl Barton
The question is to find the minimum number of races, so there is only one
answer

On 7 April 2011 06:40, Manish Pathak  wrote:

> There are two answers
>
> 11 and   7
>
>
> On Thu, Mar 31, 2011 at 12:23 PM, Abhishek Sharma 
> wrote:
>
>> @sourabh: could u please elaborate how u came to that conclusion.
>> Dave's logic seems to be right..
>>
>> On Thu, Mar 31, 2011 at 11:00 AM, sourabh jakhar > > wrote:
>>
>>> answer is 6 races
>>>
>>>
>>>
>>> On Mon, Mar 28, 2011 at 11:53 PM, Dave  wrote:
>>>
 7 races.

 For the first five races, divide the horses into groups of five and
 record the win, place, and show finishers of each race.

 For the sixth race, run the winners of the first five races.

 Now, only six horses remain in contention for the fastest three:
   The winner of the sixth race and the place and show horses of his
 first race,
   The place horse in the sixth race and the place horse in his first
 race.
   The show horse in the sixth race.
   Three of these horses are known to be faster than all other horses.

 The winner of the sixth race is known to be the fastest horse. Run the
 other five contenders in race 7 and choose the fastest two.

 Dave

 On Mar 28, 2:54 am, Lavesh Rawat  wrote:
 > *Horse Race Problem Solution*
 > *
 > *Ok, so there are 25 horses and the race track only allows 5 horses to
 race
 > at a given time. Given that there is no stop watch available your task
 is to
 > determine the fastest 3 horses. Assume that each horses speed is
 constant in
 > different races, what is the minimum number of races to determine the
 > fastest 3?
 >
 > Update Your Answers at : Click
 > Here<
 http://dailybrainteaser.blogspot.com/2011/03/28march.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.


>>>
>>>
>>> --
>>> SOURABH JAKHAR,(CSE)(3 year)
>>> ROOM NO 167 ,
>>> TILAK,HOSTEL
>>> 'MNNIT ALLAHABAD
>>>
>>> The Law of Win says, "Let's not do it your way or my way; let's do it the
>>> best way."
>>>
>>>  --
>>> 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 and Regards,
>
> Manish Pathak **
> TimesJobs.com
> Mo.  9015687266
>  http://manishpathak-mobile.blogspot.com/
>
> --
> 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] [brain teaser ] 7april

2011-04-07 Thread your name last name
> * Survive Fire in Island Puzzle *
>

Answer: The Man can escape the fire if he goes to the west corner of the
island... as the wind is blowing from the west , no fire will reach the west
corner

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