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
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?
Are negative numbers true in c?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
Explain union.
What are header files and explain what are its uses in c programming?
How can I make sure that my program is the only one accessing a file?
how logic is used
What is a function simple definition?
Is c compiled or interpreted?
Why c is procedure oriented?
How can I sort a linked list?
How can I read data from data files with particular formats?
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
What is getch?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)