急求C语言数据结构课程设计!!!!!

来源:百度知道 编辑:UC知道 时间:2024/05/25 15:55:54
各位高手,小弟急求一份课程设计,题目是:编写一个基数排序算法,将一组英文单词按字典序排序,设最长的单词有n个字母。并且可查找到指定单词。谁知道请伸出援助之手,帮在下一把,先谢谢了!!!

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ML 500

struct node
{
char data[50];
struct node *lc,*rc;
};

char article[]={"Explosives, as we all know ,are things that can't get close to.Though it dosen't sound good,it plays an important part in our world.Nowadays ,almost everthing,is made using electricity.And coal is the most important resource to make electricity.Needless to say ,metal is taken from rocks.Regardless of coal or metal,we have to use explosives to get them.In a word,if we did't have explosives,we wouldn't have such a modern world."};
int offset=0;
struct node *tree,*root;

void inorder(struct node *ctree)
{
if(ctree->lc!=NULL)inorder(ctree->lc);
printf("%s ",ctree->data);
if(ctree->rc!=NULL)inorder(ctree->rc);
}

void AddIn(char word[])
{
int i=0,k; tree=root