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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:25:09+00:00 2026-05-25T16:25:09+00:00

Binary heaps are so simple that they are almost always used when priority queues

  • 0

Binary heaps are so simple that they are almost always used when
priority queues are needed. A simple generalization is a d-heap, which
is exactly like a binary heap except that all nodes have d children
(thus, a binary heap is a 2-heap).

Notice that a d-heap is much more shallow than a binary heap,
improving the running time of inserts to O(log( base(d)n)). However,
the delete_min operation is more expensive, because even though the
tree is shallower, the minimum of d children must be found, which
takes d – 1 comparisons using a standard algorithm. This raises the
time for this operation to O(d logdn). If d is a constant, both
running times are, of course, O(log n).

My question is for d childeren we should have d comparisions, how author concluded that d-1 comparisions using a standard algorithm.

Thanks!

  • 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-25T16:25:10+00:00Added an answer on May 25, 2026 at 4:25 pm

    You have one comparison less than children.

    E.g. for two children a1 and a2 you compare only once a1<=>a2 to find the smaller one.

    For three children a1, a2, a3 you compare once to find the smaller of a1 and a2 and a second time to compare the smaller one to a3.

    By induction you see that for each additional child you need an additional comparison, comparing the minimum of the previous list with the newly added child.

    Thus, in general for d children you need d-1 comparisons to find the minimum.

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

Sidebar

Related Questions

I have created a binary heap, which represents a priority queue. It's just classical
I need to parse some simple binary Files. (The files contains n entries which
We have an n-node binary heap which contains n distinct items (smallest item at
I need to know what the Big O time of my binary heap code
I'm trying to extract the minimum from a binary heap but it's not working.
Are there any heap data structure implementations out there, fibonacci, binary, or binomial? Reference:
I have binary data in a file that I can read into a byte
What are the real world applications of Fibonacci heaps and binary heaps? It'd be
After removing the minimum element in a binary heap, i.e. after removing the root,
I have a Java binary heap dump file. Is there a generic way to

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.