C Program to find Binomial Coefficients

C Program to find Binomial Integers without using recursion. Binomial coefficients are positive integers that are coefficient of any term in the expansion of (x + a) the number of combination’s of a specified size that can be drawn from a given set. There are many ways to compute the Binomial coefficients. Like, Recursive formula …

C Program to Check if a Number is a Palindrome

A palindrome number reads the same forwards and backwards — for example 121, 1331, or 12321. This C program checks whether a given number is a palindrome by reversing its digits and comparing the result with the original number. The technique works for a number of any length, and we also show how to restrict …

C program to convert a Binary number into its equivalent Decimal, Octal and Hexadecimal numbers.

C Program to convert binary number into its equivalent Decimal, Octal, and Hexadecimal representations. In this program we convert a binary number to decimal. Then convert that decimal number to octal and Hexadecimal equivalent. The program implements various functions to do the job. binary_to_decimal : Convert given binary number to it’s decimal equivalent decimal_to_octal : Convert from …

C program to create a subsets using backtracking method.

C Program to find the subsets in the set. We use the backtracking method to solve this problem. Backtracking is the refinement method of Brute-Force method. Backtrack method means it finds the number of sub solutions and each may have number of sub divisions, and solution chosen for exactly one. Backtracking method is a recursive …

DFS Program in C – Depth First Search with Example

Depth First Search (DFS) is a graph traversal algorithm that explores as far as possible along each branch before backtracking. Starting from a source node, it follows one path all the way to a dead end, then backtracks and tries the next unvisited neighbor. DFS uses a stack — either an explicit one or the …

BFS Program in C – Breadth First Search with Example

Breadth First Search (BFS) is a graph traversal algorithm that visits every node in a graph level by level — starting from a source node, it explores all immediate neighbors first, then their neighbors, and so on. Because of this level-by-level behavior, BFS always finds the shortest path between two nodes in an unweighted graph. …