Skip to content

Latest commit

 

History

History

Sorting and Searching

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Sorting and Searching

We will try to apply the Sorting and Searching Algorithms that we know to solve a problem given in this directory. You are free to use any of such algorithms you like to make your code as efficient as possible.

Sorting

Sorting is a fundamental algorithm design problem that is used in many efficient algorithms for processing data. The problem is simple - you have an array of $n$ elements and you just have to sort it in an order.

There are many different algorithms used for sorting. There are $\mathcal{O}(n^2)$ algorithms like Selection Sort, Insertion Sort, Bubble Sort; $\mathcal{O}(n \log n)$ algorithms like Heap Sort, Quicksort, Merge Sort and many more. Let's try to use them

Searching

Searching an element is also another skill that is used while solving many problems. Though a simple Linear search takes linear time, there are other search methods that are more effective for solving problems. Use them here to solve the problem.