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 6790669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:45:09+00:00 2026-05-26T17:45:09+00:00

On CLRS’s textbook Introduction to Algorithm, there’s such paragraph on pg. 258. We can

  • 0

On CLRS’s textbook “Introduction to Algorithm”, there’s such paragraph on pg. 258.

We can delete an element in O(1) time if the lists are doubly linked. (Note that CHAINED-HASH-DELETE takes as input an element x and not its key k, so that we don’t have to search for x first. If the hash table supports deletion, then its linked list should be doubly linked so that we can delete an item quickly. If the lists were only singly linked, then to delete element x, we would first have to find x in the list so that we could update the next attribute of x’s predecessor. With singly linked lists, both deletion and searching would have the same asymptotic running times).

What puzzle me is this big parenthses, I failed to understand its logic. With doubly linked list, one still have to find x in order to delete it, how is this different from singly linked list? Please help me to understand it!

  • 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-26T17:45:10+00:00Added an answer on May 26, 2026 at 5:45 pm

    The problem presented here is : consider you have are looking at a particular element of a hashtable. How costly is it to delete it?

    Suppose you have a simple linked list :

    v ----> w ----> x ----> y ----> z
                    |
                you're here
    

    Now if you remove x, you need to connect w to y to keep your list linked. You need to access w and tell it to point to y (you want to have w ----> y). But you can’t access w from x because it’s simply linked! Thus you have to go through all your list to find w in O(n) operations, and then tell it to link to y. That’s bad.

    Then, suppose you’re doubly-linked :

    v <---> w <---> x <---> y <---> z
                    |
                you're here
    

    Cool, you can access w and y from here, so you can connect the two (w <---> y) in O(1) operation!

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

Sidebar

Related Questions

I'm reading Introduction to Algorithm by CLRS. In chapter 2, the authors mention loop
Section 9.3 in CLRS 3rd edition Selection in worst-case linear time talks about the
Having had success with my last CLRS question, here's another: In Introduction to Algorithms
In CLRS's Introduction to Algorithms 3rd edition P.525, when it analyzes the size(x)'s lower
Recently, I'm trying to solve all the exercises in CLRS. but there are some
I have a basic doubt that, How can we have both CLR's on a
In CLRS, third Edition, on page 155, it is given that in MAX-HEAPIFY, The
Hi I am reading the chapter about universal hashing on CLRS. On page 234
The successor of an element in a BST is the element's successor in the
I attended Virtual Tech Days today. In Quiz section there was the following question.

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.