|
|
|
|
자료구조프로젝트
|
|
|
|
프로그램
#include
#include
#include
#define LINE_MAX 256 /* Max: 255 characters per line */
#define WORD_MAX 20
#define TOP_SINGLE_MAX 20
#define TOP_PAIR_MAX 20
typedef struct list_single *list_single_ptr;
typedef struct list_pair *list_pair_ptr;
typedef struct list_pair {
char str[WORD_MAX];
int pair_freq;
list_pair_ptr plink;
}list_pair_node;
typedef struct list_single {
char str[WORD_MAX];
int single_freq;
list_single_ptr slink;
list_pair_ptr plink;
}list_single_node;
typedef struct {
char str[WORD_MAX];
int freq;
}single;
typedef struct {
char prestr[WORD_MAX];
char poststr[WORD_MAX];
int freq;
}pair;
void cut_special_ch (char st[]);
void cut_one_ch(char st[]);
void make_pair_list(list_single_ptr head,char preword[],char word[]);
void make_single_list(list_single_ptr head,char preword[], char word[]);
void count_freq (list_single_ptr head,char st
.... |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|