avinash3005 / Hacktoberfest2024_avi_1

Make your first PR. A beginner friendly repository made specifically for open source beginners. Add any program under any language (it can be anything from a simple program to a complex data structure algorithm). Happy coding...
8 stars 51 forks source link

Create QuickselectAlgorithm.cpp #10

Closed Anwesha-157 closed 1 month ago

Anwesha-157 commented 1 month ago

Given a set of inputs n and a value k, I have to implement Select Algorithm to find kth smallest element using Divide and conquer.

Note:

  1. Generate input data randomly with n= 500, 1000, 5000, 15000, 30000, 50000 1,00,000 and more for three different k values.

  2. Run Select algorithm, count the number of recursions called, number of comparisons made for each input size n with each k value.

  3. Plot a graph of input size n Vs. number of comparisons for three different k values. Comment on your observations.

  4. Report run time in each case specifying the platform where you have run your implementation.

  5. Create a document with program listing, results in tabulated form (input size, # of (comparisons, recursions) for k=?, # of (comparisons, recursions) for k=?, # of (comparisons, recursions) for k=?, execution time) and the graph.

avinash3005 commented 1 month ago

Merging done