C Programming Horner’s Method for Polynomial Evaluation – Mathematical Algorithms – Input is in form of array say poly[] where poly[0] represent coefficient
C Programming
C Program for Tower of Hanoi – Mathematical Algorithms – Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective is to.
C Programming – Count all possible groups – Mathematical Algorithms – Given an unsorted integer positive values only array of size ‘n’, we can form a group
Compute modulus division by a power of 2 number – Bit Algorithm – operators, where d is a power of 2 number.Let it bit from right is set in d. For getting n
C Programming-Backtracking Set 2 – Backtracking – A Maze is given as N*N binary matrix of blocks where source block is the upper left most block..maze[0][0] and destination block is lower rightmost block i.e., maze[N-1][N-1].
C Programming – 0-1 Knapsack Problem – Dynamic Programming simple solution is to consider all subsets of items and calculate the total weight and value
C Programming – Binomial Coefficient – Dynamic Programming binomial coefficient can be defined as the coefficient of X^k in the expansion of (1 + X)^n
C Programming – Coin Change – Dynamic Programming Coin Change problem has both properties of a dynamic programming problem. Like other typical DP problems
C Programming – Random number generator in arbitrary probability distribution fashion – Mathematical Algorithms – Given n numbers, each with some frequency.
Shortest Paths – C/C++ – Dijkstra’s shortest path algorithm – Given a graph and a source vertex in graph, find shortest paths from source to all vertices