sankarv
September 14th, 2006, 07:23 AM
What is Binary sorting?
How can it be performed on linked lists (in C)?
Please help.
beathan
September 14th, 2006, 08:41 AM
Are you referring to binary insertion sort, in which you have a small data set and use binary search to find the proper location for the new data before inserting it? If that's the case, then you'll be unable to use it with linked lists since they are not random access, which binary insertion sort would require.
You can implement a binary search tree that will give you the speed of binary search with inexpensive add/removal of nodes.
Here's a link (http://en.wikipedia.org/wiki/Insertion_sort) to Wikipedia with information on insertion sort, including binary insertion sort.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.