Home arrow Practices arrow Page 2 - Sort This Sort That

Sorting - Practices

One of the main activities in algorithms and programs, whose purpose is manipulating data, is sorting. So if you write these kinds of programs-what kind of method for sorting data is best? In this article I will present some algorithms for sorting and their advantages and weaknesses.

TABLE OF CONTENTS:
  1. Sort This Sort That
  2. Sorting
  3. Inserting Methods
  4. Decrementing Increment or Just Shell-Sort
  5. Selection Methods
  6. Sorting with Binary Tree
  7. Left(node) and Right(node)
By: Djordje Popovic
Rating: starstarstarstarstar / 21
February 25, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

algorithms

Let’s begin with sorting techniques. There are two groups of sorting methods: inner and outer. Inner is often used when you have data to hold in operative memory, and outer sorting is used on large quantities of data located on peripherals (such as hard disks) organized in files.

Inner Sorting

Assume that we have our keys placed in an array (a[1], a[0], ... , a[n]).  Of course you can use something else to store your keys, perhaps linked-list, but in this case a simple array is good. (Linked lists are slower due to sequential data reading each time.)

The first group of inner-sorting methods is termed "sorting by comparing". There are four method types:

  • inserting methods
  • selection methods
  • replacing methods
  • reconnecting methods

Reconnecting methods is also used for outer–sorting.



 
 
>>> More Practices Articles          >>> More By Djordje Popovic
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PRACTICES ARTICLES

- Calculating Development Project Costs
- More Techniques for Finding Things
- Finding Things
- Finishing the System`s Outlines
- The System in So Many Words
- Basic Data Types and Calculations
- What`s the Address? Pointers
- Design with ArgoUML
- Pragmatic Guidelines: Diagrams That Work
- Five-Step UML: OOAD for Short Attention Span...
- Five-Step UML: OOAD for Short Attention Span...
- Introducing UML: Object-Oriented Analysis an...
- Class and Object Diagrams
- Class Relationships
- Classes

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: