Abstract

In the field of computer science and mathematics, Sorting is arranging elements in a certain order, there are many sorting techniques are existing such as Bubble sort, Heap sort, Merge sort, Insertion sort etc. In this paper we are concentrating on heap sort, heap sort works by first organizing the data to be sorted into a special type of binary tree called a heap. The heap itself has, by definition the largest value or the smallest value at the top of the tree based on max heap or min heap. Heap sort method sorts a single element at a time. In the existing heap sort method for every construction of heap only a single root element will be sorted, so it slowdowns the performance of heap sort technique. In order to optimize the performance of heap sort we are proposing the optimized heap sort technique (OHS) by using Two-swap method. The Two-swap method sorts two-elements at a time for each heap construction, and it reduces 30-50% of the time complexity of heap sort in the construction of heap as well as in sorting of array elements.KeywordsHeapComplete Binary treeTwo-Swap method

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.