# Divide and conquer algorithms

A programmer is a person who passes as an exacting expert on the basis of being able to turn out, after innumerable punching, an infinite series of incomprehensive answers calculated with micrometric precisions from vague assumptions based on debatable figures taken from inconclusive documents and carried out on instruments of problematical accuracy by persons of dubious reliability and questionable mentality for the avowed purpose of annoying and confounding a hopelessly defenseless department that was unfortunate enough to ask for the information in the first place. Grid newsmagazine

## Quicksort

Language Java | Level Intermediate | Category Algorithms | August 3, 2015 10:20 pm

### Algorithm Problem Description

Quicksort is an efficient comparison sort algorithm compare than other sorting algorithm. It can operate in place on an array, requiring small additional amounts of memory to perform sorting.

Quicksort can be faster than merge sort and heap sort. Quicksort is one of the divide and conquer strategy algorithm. It requires careful selection of pivot element. Even if the array nearly sorted or sorted the quicksort takes the same complexity. If the array nearly sorted, we can choose insertion sort for better complexity.

Write a program to implement the quick sort.

### Output

```

Unsorted array before sorting: [12, 34, 56, 23, 45, 78, 46]
Sorted array After Quicksort sorting: [12, 23, 34, 45, 46, 56, 78]

```