Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 509 Bytes

File metadata and controls

32 lines (19 loc) · 509 Bytes

Quick Select

Question

Select the n greatest number using quick select algorithm.

Solution

.. literalinclude:: ../../languages/python/algorithm_quick_select.py
   :language: python
   :tab-width: 4

.. runcode:: ../../languages/python/algorithm_quick_select.py
   :language: python
   :codesite: ideone

Explanation

.. seealso::

   * :python-suggest-improve:`algorithm_quick_select.py`
   * :python-better-explain:`algorithm_quick_select.rst`