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

  • SEARCH
  • Home
  • 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 8235265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:44:53+00:00 2026-06-07T18:44:53+00:00

We learned how to implement singly linked list in class. And our professor kind

  • 0

We learned how to implement singly linked list in class. And our professor kind of mentioned us doing doubly linked list, but apparently its so easy that he really didn’t explain how to do it in full detail. I’m really good at with working with singly linked list, but could someone tell me how to make a doubly linked list?

  • 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-06-07T18:44:56+00:00Added an answer on June 7, 2026 at 6:44 pm

    If you already have a sound definition of a singly linked list, then a doubly linked list is easy.

    Before you probably had something like

    struct link{
      struct link* next; //a pointer to the node that comes next
      int value;
    }
    

    This will need to change to

    struct link{
      struct link* next; //a pointer to the node that comes next
      struct link* prev; //a pointer to the node that comes before
      int value;
    }
    

    Now you can basically do your operations in reverse by using previous instead of next when traversing the list.

    Keep in mind you need to be careful with your ‘book keeping’ to keep things pointed at the right things when adding or removing.

    I always tell students to draw every step of adding and removing from a linked list when writing functions. And to always make sure that you keep a reference to everything in your drawing via a pointer somewhere until it is deleted.

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

Sidebar

Related Questions

From what I've learned you should always implement the ApplicationException class for your custom
I learned about the Comparable interface, for which a class must implement compareTo method.
I learned something about DLL's yesterday. But I haven't found the way how to
I've learned that Xor operation can be used to implement effective swap function. like
I've learned the theory in a computer science class about multi dimensional arrays &
I am trying to implement an UML Class Diagram and I would like to
I just recently learned about the Properties class in java, and I'm trying to
i learned how to implement my own SuggestionOracle(AuSuggestOracle) and own Suggestions(AuMultiWordSuggestion). In my case
I've learned and implement successfully that how to upload images on server disk with
I just learned about comet pattern(Long polling) and very curious to implement a simple

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.