adjacency matrix or 2-d array

darentan used Ask the Experts™
Hi all,

if writing in pas, would 2d array or adjacency matrix be better or easier.

i am preparing to write a program on subjects, objects and directed edges (like a b-tree) with checking for cycle.

and also is there any way we could write program to show the tree rather than sentences - eg.

                    / \
                   b   c
                  /\   /\
                 /  \ /  \
                /    \/   \
               d      e    f

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®


Pascal is, on my opinion, the best choice for your project. But it is up to you what language to use. You can solve your project using C++, or for example Eiffel.

With regard to Pascal You can find lots of sources in the internet. Below I you can see some of them.

I hope it could be helpfull.



i thinking of gui interface as in java as pas are bad in it. it is my assignment and only two choice - java or pas. but java i not so sure :(

the tricky part is the displaying of the adjacency maxtrix into tree figure rather than table .
I don"t know what platform you plan to use. In Windows you can use Delphi (comercial) or some free compilers for example
freepascal ( or you can find something another (
In Linux you can use free Delphi port - Kylix.

With regard to Java it is free too.
On my opinion the best language is that one which you know :).

This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial