Fix if you are getting TLE using Quick Sort
I was getting TLE using QuickSort.\nI was always selecting the end element as the pivot. It seems that there are test cases designed to punish you for this, for
I was getting TLE using QuickSort.\nI was always selecting the end element as the pivot. It seems that there are test cases designed to punish you for this, for example if the test case is nearly sorted, it will become O(n^2).\n\nA simple solution is to swap the middle element with the end element, before selecting the end element as the pivot.\ne.g.\n```\nvar mid = (start+end)/2;\nSwap(mid, end);\nvar pivot = nums[end];\n```\nOr else you can use a more complicated pivot selection method
[]