Sort a nearly sorted (K sorted) array – Searching and sorting – Given an array of n elements, where each element is at most k away from its target position.
sorting in data structure
Merge Sort for Linked Lists – Searching and Sorting – Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as quicksort) perform poorly, and others (such as heapsort) completely impossible.
Find the Minimum length Unsorted Subarray, sorting which makes the complete array sorted -Searching and sorting – Given an unsorted array arr[] of size n. find the minimum length subarray arr[s..e]
Lower bound for comparison based sorting algorithms – Searching and sorting – A sorting algorithm is comparison based if it uses comparison operators to find the order between two numbers.
Which sorting algorithm makes minimum number of memory writes – Searching and Sorting – Minimizing the number of writes is useful when making writes to some huge data set is very expensive, such as with EEPROMs or Flash memory, where each write reduces the lifespan of the memory.
stability in sorting algorithms – Searching and Sorting – Some sorting algorithms are stable by nature like Insertion sort, Merge Sort, Bubble Sort, etc. And some sorting algorithms are not, like Heap Sort, Quick Sort.
Cycle Sort – Searching and sorting – Cycle sort is an in-place sorting Algorithm,unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array
Bubble Sort – searching and sorting algorithm – Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements .