Binary Search using C

This example shows how Binary Search Algorithm works and I am going to implement it using C programming language. Binary search, also known as half-interval search, logarithmic search, or binary chop, is a search algorithm that finds the position of a target value within a sorted array. Binary search compares the target value to the middle element of the array….

Sequential Search using C

This example shows how Sequential Search algorithm works. In sequential or linear search an element is searched or found in a list. Simple way to search for a key value k in an array a is to compare the values of the elements in a with k. The process starts with the first element of the array and k and…

Binary Tree using pointer in C

Introduction Here we will see example on binary tree using pointer in C programming language. The same concept can be used in other language to write program for binary tree. What is Binary Tree? Binary tree is an important class of tree in data structure. A node in binary tree can have at most two children, which are called sub-trees….

Queue using Linked List in C Program

Introduction We will create an example on queue using linked list in C program. A queue like a stack is another special type of ordered list. In queue insertion operations are permitted at one end of the list and deletion operations are performed at the other end of the list. The end where insertion operations are performed is called rear…

Stack using Linked List in C Program

Introduction We will see how to create stack using linked list in C program. Stack is a special kind of linear list. Linear list is an ordered collection of a number of items of the same type. Two operations are performed frequently from linear list – insertion and deletion. A stack is a linear list where all insertions and deletions…

Doubly Linked List Example Using C Program

Introduction In this post we will create doubly linked list example using C program. This example shows how to create, insert, append, remove nodes in doubly linked list using C program. We will use here Structure, which is a composite data type, in which we can define all data types under the same name or object. Size of the Structure…

Singly Linked List Example Using C Program

Introduction This example shows how to create, insert, append, remove nodes in singly linked list example using C program. We will use here Structure, which is a composite data type, in which we can define all data types under the same name or object. Size of the Structure is determined by computing the size of all data types, plus any…

Multiplication of Two Polynomials using C Program

Introduction This example shows an example on multiplication of two polynomials using C program. For multiplication of two polynomials we will use here Structure, which is a composite data type, in which we can define all data types under the same name or object. Size of the Structure is determined by computing the size of all data types, plus any…

Addition of two Polynomials using C Program

This example shows how to add two polynomials using C program. For addition of two polynomials we will use here Structure, which is a composite data type, in which we can define all data types under the same name or object. Size of the Structure is determined by computing the size of all data types, plus any internal padding. The…

C Program to Compute Transpose of a Matrix

Introduction This example will show you how to compute transpose of a matrix in C program. In this example a user will be asked to enter the number of rows and columns for matrices. Then user will be asked to enter the elements at each index of the matrix. A matrix has to be square matrix for computing the transpose…