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
With the help of using classes, write a program to add two numbers.
When should the register modifier be used? Does it really help?
What are different types of pointers?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What does c in a circle mean?
Add Two Numbers Without Using the Addition Operator
Did c have any year 2000 problems?
What is file in c preprocessor?
How can you access memory located at a certain address?
Write a program to print "hello world" without using a semicolon?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
What is structure of c program?
What does %p mean c?
Explain the process of converting a Tree into a Binary Tree.
Explain function?