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

With the help of using classes, write a program to add two numbers.

1002


When should the register modifier be used? Does it really help?

931


What are different types of pointers?

1026


#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); }

1083


What does c in a circle mean?

1034


Add Two Numbers Without Using the Addition Operator

786


Did c have any year 2000 problems?

1069


What is file in c preprocessor?

1100


How can you access memory located at a certain address?

1072


Write a program to print "hello world" without using a semicolon?

1023


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1605


What is structure of c program?

1100


What does %p mean c?

1024


Explain the process of converting a Tree into a Binary Tree.

2626


Explain function?

1046