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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:39:10+00:00 2026-05-31T14:39:10+00:00

I was reading sorting method which include bubble sort, selection sort, merge sort, heap

  • 0

I was reading sorting method which include bubble sort, selection sort, merge sort, heap sort, bucket sort etc.. They also contain time complexity which help us to know which sorting is efficient. So I had a basic question. If we contain data than how will we be choose sorting. Time complexity is one of parameter which help us to decide sorting method. But do we have another parameter to choose sorting method?.

Just trying to figure out sorting for better understanding.

Having some query about heap sort:

  1. Where do we use heap sort?

  2. What is bigger advantage of heap sort (except time complexity O(n log n))?

  3. What is disadvantage of heap sort?

  4. What is build time for heap? (I heard O(n) but I’m not sure.)

  5. Any scenario where we have to use heap sort or heap sort is better option (except priority queue)?

  6. Before applying the heap sort on data, what are the parameter will we look into data?

  • 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-31T14:39:12+00:00Added an answer on May 31, 2026 at 2:39 pm

    The two main theoretical features of sorting algorithms are time complexity and space complexity.

    In general, time complexity lets us know how the performance of the algorithm changes as the size of the data set increases. Things to consider:

    • How much data are you expecting to sort? This will help you know whether you need to look for an algorithm with a very low time complexity.
    • How sorted will your data be already? Will it be partly sorted? Randomly sorted? This can affect the time complexity of the sorting algorithm. Most algorithms will have worst and best cases – you want to make sure you’re not using an algorithm on a worst-case data set.
    • Time complexity is not the same as running time. Remember that time complexity only describes how the performance of an algorithm varies as the size of the data set increases. An algorithm that always does one pass over all the input would be O(n) – it’s performance is linearly correlated with the size of the input. But, an algorithm that always does two passes over the data set is also O(n) – the correlation is still linear, even if the constant (and actual running time) is different.

    Similarly, space complexity describes how much space an algorithm needs to run. For example, a simple sort such as insertion sort needs an additional fixed amount of space to store the value of the element currently being inserted. This is an auxiliary space complexity of O(1) – it doesn’t change with the size of the input. However, merge sort creates extra arrays in memory while it runs, with an auxiliary space complexity of O(n). This means the amount of extra space it requires is linearly correlated with the size of the input.

    Of course, algorithm design is often a trade-off between time and space – algorithms with a low space complexity may require more time, and algoithms with a low time complexity may require more space.

    For more information, you may find this tutorial useful.


    To answer your updated question, you may find the wikipedia page on Heap Sort useful.

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

Sidebar

Related Questions

I was reading about sorting of presorted list in which few numbers are unsorted,
I am reading a piece of C heap sorting code and encounter this: do{
I was recently reading an article which mentioned: For God's sake, don't try sorting
Hi there I'm reading a string and breaking each word and sorting it into
just was reading this article http://highscalability.com/blog/2010/3/23/digg-4000-performance-increase-by-sorting-in-php-rather-than.html And found this nice article http://wiki.apache.org/cassandra/DataModel I just
#include<stdlib.h> #include<stdio.h> #include<string.h> //This program is a sorting application that reads a sequence of
I'm reading the block sort algorithm from the Burrows and Wheeler paper. This a
I am reading some numbers from a local file and then trying to sort
I have to sort a number of integers, which can have values between 30.000.000
So I was reading up on sorting arrays in PHP and it makes sense,

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.