• Sunday, October 6, 2013

    Huffman's algorithm

    Syed Masoom Rizvi

    What is Huffman's algorithm?

    Ans: Huffman’s algorithm is a method for building an extended binary tree with a minimum weighted path length from a set of given weights. Initially construct a forest of singleton trees, one associated with each weight. If there are at least two trees, choose the two trees with the least weight associated with their roots and replace them with a new tree, constructed by creating a root node whose weight is the sum of the weights of the roots of the two trees removed, and setting the two trees just removed as this new node’s children. This process is repeated until the forest consists of one tree.

    src: planetmath.org

    Saturday, October 5, 2013

    Solve Quadric equation using C programming

    Syed Masoom Rizvi
    Here you get a program that calculate the solution of quadric equation......
    #include <stdio.h>;
    #include <conio.h>;
    float a,b,c,x1,x2,disc;