Efficient Huffman Coding for Sorted Input – Greedy Algorithm – Time complexity of the algorithm discussed in above post is O(nLogn). If we know that the given array is sorted (by non-decreasing order of frequency).
Coding
Latest Articles and Errors& Fixes fo popular programming languages like HTML,CSS, PHP, Javascript, Angularjs and more
Bubble Sort – searching and sorting algorithm – Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements .
Selection Sort – searching and sorting algorithm – The selection sort algorithm sorts an array by repeatedly finding the minimum element .
Exponential Search – searching and sorting algorithm – The name of this searching algorithm may be misleading as it works in O(Log n) time.
Interpolation Search – searching and sorting algorithm- The Interpolation Search is an improvement over Binary Search for instances, where the values .
TERNARY SEARCH – searching and sorting algorithm – The ternary search does less number of comparisons as it makes Log3n recursive calls, but binary search.
Jump Search – search and sorting algorithm – Jump Search is a searching algorithm for sorted arrays.Basic idea is to check fewer elements.
C program to find ncr and npr – C Programming – C program to find nCr and nPr: This code calculate nCr which is n!/(r!*(n-r)!) and nPr = n!/(n-r)!
Binary Search – search and sorting – Search a sorted array by dividing the search interval in half. Begin with an interval covering the whole array.
Linear Search – searching and sorting – algorithm -A simple approach is to do linear search, Start from the leftmost element of arr[] and one by one compare