C Program to Find kth Largest Element in a Sequence

This C program finds the kth largest element in a sequence. QuickSelect, a variant of quicksort algorithm is used to find the kth largest element in a sequence in O(n) time. Here is the source code of the C program to find the kth largest element in a sequence. The C program is successfully compiled … Read more

advertisement

C Program to Perform Uniform Binary Search

This C program performs uniform binary search. Uniform binary search is an optimization of the classic binary search algorithm invented by Donald Knuth and given in Knuth’s The Art of Computer Programming. It uses a lookup table to update a single array index, rather than taking the midpoint of an upper and a lower bound … 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

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

C Program to Search and Replace Word with Specific Word

This is a C Program to search a word & replace it with the specified word. Problem Description This C Program Searches a Word & Replace it with the Specified Word. Problem Solution Take input from the user and performs string operations as shown in the program below. Program/Source Code Here is source code of … Read more

advertisement

C Program to Perform Binary Search using Recursion

This is a C Program to search an element in an Array using Binary Search Algorithm using recursion. Problem Description We have to create a C Program which inputs a sorted array and tells whether the key searched is present in array or not using Binary Search Algorithm recursively. We have to take array and … Read more

advertisement

C Program to Search an Element in an Array

This is a C Program to read an array and search for an element. Problem Description This program will implement a one-dimentional array, take a number form users to search for in the array using Binary Search. Problem Solution 1. Create an array of some certain size and define its elements in sorted fashion. 2. … 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.