Home arrow JavaScript arrow Quicksort
JAVASCRIPT

Quicksort


There are different algorithms for sorting an array of strings. Time-critical client applications often use the algorithm called Quicksort, which is very efficient for such applications. This two-part article series takes a close look at writing and using such a function.

Author Info:
By: Chrysanthus Forcha
Rating: 4 stars4 stars4 stars4 stars4 stars / 4
October 20, 2008
TABLE OF CONTENTS:
  1. · Quicksort
  2. · Tutorial Approach
  3. · The Quicksort Algorithm
  4. · Quicksort by Observation
  5. · Computer Implementation

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Quicksort
(Page 1 of 5 )

Introduction

At the moment I am writing a series of articles concerning database programming. Some recordset APIs are supplied with a Sort function; you just use the Sort function without knowing how it was written. Other APIs may not have any sort function; this means that you have to write the sort function yourself (when you need one). So, if you are a database programmer, knowing how to write an efficient sort function is a big plus. In this article, I show you how to write the Quicksort function, which is very efficient for traditional (client side) database programming.

There are other reasons why you would want to understand sort functions, in particular the Quicksort function. Maybe you want to write a database programming API. Maybe you did not understand the topic well when you studied it in college or at a university. Maybe they did not even cover it at your university.

Maybe you are a self-taught programmer and you want to learn more. Maybe you are a teacher or lecturer and you want to get a better understanding of the topic in order to teach it well. Maybe you want to write a Sort function for an array of strings, which is not concerned with a database.

Well, I will show you how to write only the Quicksort function, since it is the type relevant to the series I am writing. I will use JavaScript. You need a browser and text editor to try the code.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks
- Dynamic jQuery Styling

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials