Web Design, Development & Marketing
acuras services: Website Design & Development E-commerce Solutions Content Management Systems Online Marketing & Social Media Corporate Branding Social Media Training
Get in touch... Email Us: info@acuras.co.uk
acuras blog:7 Quick Tips to Keep Your SEO On Track in 2012 7 Social Media & SEO Tactics Businesses Will Adopt in 2012 latest posts:We are now trading as a Limited company Recent Work: Digital Marketing Material and Website Re-Designs Affordable Web Hosting and Domain Name Registration New Acuras Logo Coming Soon... Barclaycard ePDQ CPI Integrations HSBC XML API / CPI E-commerce Integrations Photoshop to Valid XHTML/CSS Coding Service Recommended Open Source Invoicing System Reasons Businesses should Embrace the Web blog archive:
Web Development ArticlesJava: Quick Sort Algorithm AnalysisPublished: 13th Jun 2006 The Quick Sort is a recursive algorithm which is very similar to the Merge Sort. It takes an element in a list and uses that element as a pivot value to divide the whole list into two parts. This division is done so that one of the parts contains elements less than the pivot. The other part contains elements that are larger than the pivot. This process is then repeated recursively on these two resultant parts. When the algorithm arrives at a single element to be sorted, nothing is done as this single element is “sorted”.
The Quick Sort has O(N log(N)) average case time complexity. If implemented so that the pivot point is always set to the first element of the current list, the worst case time complexity is of O(N2). The Quick Sort has the advantage of being a very fast algorithm but it is also very complex due to its heavy use of recursion. Related LinksRelated Articles / PostsJava: Quick Sort Algorithm Analysis (13/06/2006) Java: Merge Sort Algorithm Analysis and Code (05/04/2006) Java: Random Array Generator (29/03/2006) Java: Insertion Sort Algorithm Analysis and Code (29/03/2006) Java: Binary Search Algorithm Analysis and Code (29/03/2006) |
||