পৃষ্ঠাসমূহ

শনিবার, ১১ জুন, ২০১১

Huffman Coding (using dfs)

#include
#include
#include
#include
#include

#define lenght 100
using namespace std;
void makeCode(int i);
int matrix[lenght][lenght];int num_node;
mapmp;
stackletter;
class vertex{
public:
int id;
int frequency;
int nodeValue;
char c;
string str;
int left;
int leaf;
};
vertex node[lenght];
struct vertex node2[lenght];
string x;
mapv;
maptaken;
mapstream;
mapvisit;
mapleft_child;
bool compare(class vertex a, class vertex b){
if(a.nodeValue