/******************************************************* * Copyright (C) 2015 Haotian Wu * * This file is the solution to the question: * https://www.hackerrank.com/challenges/quicksort1 * * Redistribution and use in source and binary forms are permitted. *******************************************************/ #include #include #include #include #include #include #include using namespace std; // Let's write a quick sort. void quicksort(int arr[], int st, int ed) { if (st >= ed) return; int pivot = arr[st]; int i=st,j=ed; while (i=pivot) j--; while (i