Insertion Sort for Singly Linked List – Searching and sorting – We have discussed Insertion Sort for arrays.In this article linked list is also discussed.
sorting in c
JAVA Program Count 1’s in a sorted binary array – Searching and Sorting – A simple solution is to linearly traverse the array. The time complexity of the simple solution is O(n). We can use Binary Search to find count in O(Logn) time.
JAVA programming – Given a sorted array and a number x, find the pair in array whose sum is closest to x – Searching and sorting – Given a sorted array and a number x, find a pair in array whose sum is closest to x.
C++ programming – Given a sorted array and a number x, find the pair in array whose sum is closest to x – Searching and sorting – Given a sorted array and a number x, find a pair in array whose sum is closest to x.
C programming – Given a sorted array and a number x, find the pair in array whose sum is closest to x – Searching and sorting.- Given a sorted array. find a pair in array whose sum is closest to x.
Search in an almost sorted array – Searching and Sorting – A simple solution is linearly search given key in given array.Time complexity of solution is O(n).We cab modify binary search to do it in O(Logn) time.
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.
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]
Comb Sort – Searching and Sorting – Comb Sort is mainly an improvement over Bubble Sort. Bubble sort always compares adjacent values. So all inversions are removed one by one. Comb Sort improves on Bubble Sort by using gap of size more than 1.
Insertion Sort – searching and sorting algorithm – Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands.