Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find the kth smallest element in the given list of
array elemnts.

Answer Posted / newclient

sorting is not required in this case.u can still use same
technique(not exactly) as mentioned in Cormen.an algorithm
named "QuickSelect" which has an average complexity of
O(nlong(n)).
Anyways to reduce the number of comparisions one can use
tournament algorithm and for kth element we have to
recursively go through the loosers list.

Is This Answer Correct ?    9 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

2184


Are negative numbers true in c?

1069


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1128


Explain union.

1176


What are header files and explain what are its uses in c programming?

1135


How can I make sure that my program is the only one accessing a file?

1280


how logic is used

1977


What is a function simple definition?

1101


Is c compiled or interpreted?

1195


Why c is procedure oriented?

1081


How can I sort a linked list?

1049


How can I read data from data files with particular formats?

1049


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1702


What is getch?

1195


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2647