Advertisement

10.25.2007 at 10:34PM PDT, ID: 22919513
[x]
Attachment Details

How to properly code an Adjacency List

Asked by dennismv in Algorithms, C++ Programming Language

Tags: , ,

for graph type problems I've been using an adjacency matrix.
But now I'm dealing with an adjacency list type problem.

It seems to me that the most natural way to implement the list is to use linked list structure.  But creating a list from scratch is kinda ... messy in my opinion.  Using 2D arrays for matrix seems so much cleaner -- no messing with pointers.  

But then if you're not using lists, how do you implement an adjacency list ? Start Free Trial
[+][-]10.25.2007 at 10:38PM PDT, ID: 20153375

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.25.2007 at 10:39PM PDT, ID: 20153384

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.25.2007 at 10:45PM PDT, ID: 20153404

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.25.2007 at 10:52PM PDT, ID: 20153427

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.25.2007 at 10:53PM PDT, ID: 20153430

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.25.2007 at 11:02PM PDT, ID: 20153472

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.25.2007 at 11:08PM PDT, ID: 20153498

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.25.2007 at 11:42PM PDT, ID: 20153634

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 10:19AM PDT, ID: 20171325

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Algorithms, C++ Programming Language
Tags: adjacency, list, code
Sign Up Now!
Solution Provided By: JoseParrot
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628