 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Aditi Guest
|
Posted: Wed Apr 25, 2007 5:13 pm Post subject: URGENT need soln to this problem.. for PROJECT interview... |
|
|
Hi everyone!
PLEASE suggest a solution for this problem i need to submitt it in 3
hrs... for my project interview..thanks
Following is the problem, You need to come up with a solution for it
in PL/SQL, Write a working stored proc for the same.
Consider the following table:
Person A Person B Relationship
1 3 a
3 2 b
4 6 c
4 5 d
6 2 e
4 7 f
8 9 g
9 4 h
2 6 i
7 1 j
2 3 p
1 7 k
3 6 l
7 5 m
5 4 n
8 3 o
9 3 p
4 6 q
What is needed to be done is:
Recursively loop through this table given 2 arguments Person A and
Person B. Find all unique paths which lead from A to B and keep
concatenating the relationship in the output .
Take this example for reference:
------------------------------------------------------------------------------------------------------------------------
Relation 1:
Anil is brother of Seema,
Seema is friend of Meena and
Meena is child of Teena
Relation 2:
Anil is friend of Guru
Guru is brother of Ram
Ram is father of Sham
Sham is child of Reema and
Reema is friend of Teena
Then find out the all the relationships b/w Anil and Teena.
Anil, Teena are the input parameters.
First output: Anil - brother of - Seema- friend of - Meena - child of
- Teena
Second output: Anil - friend of - Guru - brother of - Ram - father of
- Sham -child of - Reema - friend of - Teena
-------------------------------------------------------------------------------------------------------------------------
Likewise, you have to find all the unique relations that can exist
between A and B without getting into an infinite loop.
Please follow standards and naming conventions followed in your last
project.
Please send the solution as an attachment. |
|
| Back to top |
|
 |
EricF Guest
|
Posted: Thu Apr 26, 2007 7:10 am Post subject: Re: URGENT need soln to this problem.. for PROJECT interview |
|
|
In article <1177503214.069300.84020 (AT) n35g2000prd (DOT) googlegroups.com>, Aditi <drool.galz (AT) gmail (DOT) com> wrote:
| Quote: | Hi everyone!
PLEASE suggest a solution for this problem i need to submitt it in 3
hrs... for my project interview..thanks
Following is the problem, You need to come up with a solution for it
in PL/SQL, Write a working stored proc for the same.
Consider the following table:
Person A Person B Relationship
1 3 a
3 2 b
4 6 c
4 5 d
6 2 e
4 7 f
8 9 g
9 4 h
2 6 i
7 1 j
2 3 p
1 7 k
3 6 l
7 5 m
5 4 n
8 3 o
9 3 p
4 6 q
What is needed to be done is:
Recursively loop through this table given 2 arguments Person A and
Person B. Find all unique paths which lead from A to B and keep
concatenating the relationship in the output .
Take this example for reference:
-------------------------------------------------------------------------------
-----------------------------------------
Relation 1:
Anil is brother of Seema,
Seema is friend of Meena and
Meena is child of Teena
Relation 2:
Anil is friend of Guru
Guru is brother of Ram
Ram is father of Sham
Sham is child of Reema and
Reema is friend of Teena
Then find out the all the relationships b/w Anil and Teena.
Anil, Teena are the input parameters.
First output: Anil - brother of - Seema- friend of - Meena - child of
- Teena
Second output: Anil - friend of - Guru - brother of - Ram - father of
- Sham -child of - Reema - friend of - Teena
-------------------------------------------------------------------------------
------------------------------------------
Likewise, you have to find all the unique relations that can exist
between A and B without getting into an infinite loop.
Please follow standards and naming conventions followed in your last
project.
Please send the solution as an attachment.
|
So if I help you do I get the job? Or are we just helping you with your
homework? And we want to do this because .... |
|
| Back to top |
|
 |
David Harper Guest
|
Posted: Thu Apr 26, 2007 7:10 am Post subject: Re: URGENT need soln to this problem.. for PROJECT interview |
|
|
EricF wrote:
| Quote: | In article <1177503214.069300.84020 (AT) n35g2000prd (DOT) googlegroups.com>, Aditi <drool.galz (AT) gmail (DOT) com> wrote:
Hi everyone!
PLEASE suggest a solution for this problem i need to submitt it in 3
hrs... for my project interview..thanks
Following is the problem, You need to come up with a solution for it
in PL/SQL, Write a working stored proc for the same.
[SNIP]
Please follow standards and naming conventions followed in your last
project.
Please send the solution as an attachment.
So if I help you do I get the job? Or are we just helping you with your
homework? And we want to do this because ....
|
Nobody posted a solution, so I guess that Aditi didn't get the job.
I hear that McDonalds is still hiring, and they don't set Java coding tests.
David Harper
Cambridge, England |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|