C Program to Implement Bubble Sort

What is Bubble Sort? Bubble Sort in C is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items, and swapping them if they are in the wrong order. Bubble sort technique is used to sort an array of values in increasing or decreasing … Read more

advertisement

C Program to Generate Subsets with k Elements in each Subset

This C program generates subsets with k elements in each subset. Here is the source code of the C program to display all subsets with k element in each subset. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C program to print all … Read more

advertisement

C Program to Implement Alexander Bogomolny’s UnOrdered Permutation Algorithm

This C program implements Alexander Bogomolyn’s unordered permutation algorithm to find all permutations of numbers from 1 to n. Here is the source code of the C program to display all possible permutations of numbers from 1 to n using Alexander Bogomolyn’s unordered permutation algorithm. The C program is successfully compiled and run on a … Read more

advertisement

C Program to Generate All Possible Combinations of List of Numbers

This C program to generate all combination of list of numbers. Here is the source code of the C program to display all possible combination of list of numbers. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C program to print all combination … Read more

advertisement

C program to Implement Interpolation Search on Array of Integers

This is a C Program to implement interpolation search on array of integers. Problem Description We have to create a C Program which finds the position of an element in an array of numbers using Interpolation Search Algorithm, if it is present in the array. Expected Input and Output 1. Average case : On an … Read more

advertisement

C Program to Implement Binary Search with Window

This C program implements Binary search with window. Here is the source code of the C program Implement a binary search algorithm such that search starts from the pth element and searches subsequently with a jump of 2^i i.e. p+1,p+2,p+4,p+8,…and continues until the correct window for the key is obtained. Now binary search is implemented … Read more

advertisement

C Program to Implement Locality of Reference in Link List

This C program Implements locality of reference in Link list. Here is the source code of the C program which implements locality of reference in Link list.The found element in a linked list moves to the front as soon as it is found. The C program is successfully compiled and run on a Linux system. … Read more

advertisement

C Program to Implement Sequential and Binary Search on Same Array

This C program Implements Sequential and Binary Search on Same Array. Here is the source code of the C program to display search result using Sequential search and Binary search. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C program for binary search … Read more

advertisement

Bucket Sort in C

Problem Description Write a program to implement Bucket Sort in C. What is Bucket Sort? In the bucket sort algorithm, we will create multiple small groups containing a range of elements (called buckets). Then these groups are back joined again and the sorted array is formed. This method is also known as the “scatter and … Read more

advertisement

C Program to Implement KMP Pattern Searching Algorithm

The KMP algorithm is a very fast algorithm for string matching. It is used in many applications like searching for a substring in a large string. The algorithm is based on the idea that if we know the longest prefix of the pattern that is also a suffix of the pattern, then the pattern can … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.