This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******************************************************************* | |
// File: HuffmanEncoding.c | |
// Author(s): Mohamed Ennahdi El Idrissi | |
// Date: 14-Aug-2012 | |
// | |
// Input Files: in.txt | |
// Output Files: out.txt | |
// Description: CSC 2302 - <Data Structures> | |
// <Struct, Array, File I/O, Recursion, Pointers, Binary Tree> | |
// This program covers the Huffman Encoding concept. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.exercises.test; | |
import java.util.Random; | |
import com.exercises.main.EvaluationExercise; | |
public class EvaluationExerciseTest { | |
/** | |
* Unit testing of a random number of cases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.exercises.main; | |
import java.util.Scanner; | |
/** | |
* @author Mohamed Ennahdi El Idrissi | |
* | |
* | |
* This program does the following: | |
* - Reading the size (int) of the array from the keyboard; | |
* - Reading each element of the array from the keyboard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.blogspot.mohalgorithmsorbit.equation; | |
/** | |
* | |
* @author Mohamed Ennahdi El Idrissi | |
* | |
*/ | |
public class Equation { | |
int n; | |
int base; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define N 256 | |
#define L 1000000 | |
#define nstr 100 | |
/* | |
* 'str1' and 'str2' are two temporary variables where we store strings to process | |
*/ | |
char str1[N]; | |
char str2[N]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define LIST_MAX_SIZE 200 | |
#define NUMBER_OF_WORDS 30 | |
#define NUMBER_OF_CHARACTERS 5 | |
typedef struct { | |
char word[NUMBER_OF_CHARACTERS]; | |
int number; | |
int hashedNumber; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* | |
* Maximum number of tournaments we can have. | |
*/ | |
#define MAX 1000 - 1 | |
/* | |
* Maximum size of the description string. | |
*/ | |
#define DESC 80 + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Mohamed Ennahdi El Idrissi | |
*/ | |
#include <stdio.h> | |
/* | |
* M is the length of the string ( 0 < M <= 100 ) | |
*/ | |
#define M 100 | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
/* | |
* M is the maximum size that a line can take. | |
*/ | |
#define M 100 | |
/* | |
* N is the maximum size that a column can take. | |
*/ | |
#define N 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define N 26 | |
/* | |
* This structure gathers the elements (letters) and their frequency. | |
*/ | |
typedef struct { | |
char sourceAlphabet[N]; | |
unsigned frequency; | |
} Symbol; |
NewerOlder