DEV Community

Saranya R
Saranya R

Posted on

Kth Smallest

Approach Explanation <(^-^)>

  1. I sorted the array in ascending order using sort function.
  2. I picked the element at position k-1
  3. That element is the kth smallest.

Methods Used o( ̄▽ ̄)/

  • Sorting method
  • Direct indexing

Top comments (0)