Wednesday, October 17, 2012

Kth smallest element in an unsorted array

Given an array of unsorted numbers, find the Kth smallest element in the array.
Input:  10, 8, 5, 7, 14, 3
K = 4
Output: 8

Solution

No comments:

Post a Comment

UA-36403895-1