y applying the quickselect algorithm, which is a variation of the quicksort algorithm, I was able to efficiently find the Kth smallest element in the array in O(n) time complexity. This involved partitioning the array around a pivot element, and recursively applying the same process to the sub-arrays until the Kth smallest element was found.