/python_kth_largest

Find the 'kth' largest element in an array.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Kth Largest Element

Find the 'kth' largest element in an array.

HOW TO USE

Here are two ways of solving the problem, you can use the simplest approach or use a quickselect with recursion.

The quick select is considerably more code, but it has a better average time complexity than the simplest approach.

algorithm implementation
simplest simple.py
quickselect quickselect.py

LICENSE

This project is under GNU General Public License v3.0

Developed by Marcelo Cortez Packaged and organised by Carlos Pinto Machado