Hi
I have data in comparision forms:
a1 a2 1
a2 a3 1
a4 a5 1
a5 a6 1
a6 a7 1
a1 a5 1
a5 a2 1
a4 a1 1
a7 a8 0
above indicates ex. a2 is larger than a3
and a7 is same as a8.
First 2 lines also implies that a1 is larger than a3
I have to find where there is any comparision can be obtained or derived between given elements.
ex. a3 and a6. ie.. whether a3 is larger , smaller or equal to a6 OR no relationship is defined yet between them.
The idea that comes to my mind is to find out all smaller elements than a3 and find out all larger elements and than check both array for a6.
Your suggestions will be helpful.
Thanks,
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.