Re: question of kth smallest number
"alix" <email@example.com> wrote:
>I need a code to find the kth smalest number in an unsorted array.
since ur question was not really clear.i think kth smallest element in any
unsorted array can be found by first sorting it in ascending order and reading
then reading the kth element of the array.as under
printf("enter the kth position u want and the array length");
printf("enter the elements of array");
printf("the %d smallest element is %d",k,*(a+k));
\\i think this should serve ur purpose,if not mail me at my e-mail.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL