Create a bug report to help us improve our content -
Your email registered on BackToBackSWE : abhi.rawat456@gmail.com
Category of the bug :
[ ] Question
[ ] Solution
[ x ] Language
Description of the bug :
The problem constraints suggests the value of k can be zero. But put into context, the 0th largest/smallest element in a collection doesn't make much sense.
Expected behavior :
Personally, I think the constraints for 'k' should be 1 <= k <= len(arr)
Back To Back SWE
Create a bug report to help us improve our content -
Your email registered on BackToBackSWE : abhi.rawat456@gmail.com
Category of the bug :
Description of the bug :
The problem constraints suggests the value of k can be zero. But put into context, the 0th largest/smallest element in a collection doesn't make much sense.
Expected behavior :
Personally, I think the constraints for 'k' should be 1 <= k <= len(arr)