Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3219210
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:37:07+00:00 2026-05-17T15:37:07+00:00

Where would be the best place to put the edge length in an adjacency

  • 0

Where would be the best place to put the edge length in an adjacency list implementation? I using this site as reference. What I am thinking is to put it in the edge node so to find the length from one vertex to another, you go to one of the vertex nodes and find its connecting edges and access the relevant member. (see part 5: “Data types for implementation” on the linked page)

This seems sound to me, but I’ve looked through many sites and no site confirms that this works. I also remember reading somewhere that it is much easier to implement lengths in adjacent matrices but stopped short of saying whether it possible to implement lengths in adjacency lists at all or just harder.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:37:08+00:00Added an answer on May 17, 2026 at 3:37 pm

    The edgeTag is the perfect place for the edge length. And about the graph representation, it depends on your needs – adjacency matrix is ineffective for sparse graphs(to find the adjacent nodes you must check them all), although it is a little bit easier to work with it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am not sure where the best place to put validation (using the Enterprise
According to Facebook: The best place to put this code is right after the
Where would be the best standard place to put an application's debug log file
I'm wondering where the best place to put Type specific functions is when using
I know this isn't the best place to put this question but here it
How best would I exclude results from #other_section, given a structure like this? <form>
I am trying to determine which implementation of the data structure would be best
I'm new to Python and I'm not sure what's the best place to put
I am unsure about where would be the best place to define the redis
What is the best place to put the Jasmine files (libs, specs, SpecRunner.html) in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.