程序和英语的问题,请帮我翻译并且做出答案,谢谢

来源:百度知道 编辑:UC知道 时间:2024/06/21 23:02:48
Do you know all the different ways to do quick sorting and searching?
try to build a tree structure to keep the strings the user typed in.

the code could be something like:

class treenode
{
string str;
treenode left;
treenode right;
}

class tree
{
treenode root;
funciton addstring(string);
function printout();
}

mian()
{

tree Root;

while loop
{
ask user enter a string;
read the string in;
check if the string is empty;
if empty, break from loop
else call
Root.addnode(the user string);

}

Root.printout();
}

how do you implement the function addString() and printout()
the user may add 1 million strings, you have to store them and sort them quick.

tell me what the language you are using, try to understand what I want.

Do you know all the different ways to do quick sorting and searching? 你知道快速排序和查找的所有方法吗?
try to build a tree structure to keep the strings the user typed in. 尝试着建立一个树来保持用户输入的字符串
the code could be something like:
部分代码如下:
class treenode
{
string str;
treenode left;
treenode right;
}

class tree
{
treenode root;
funciton addstring(string);
function printout();
}

mian()
{

tree Root;

while loop
{
ask user enter a string;
read the string in;
check if the string is empty;
if empty, break from loop
else call
Root.addnode(the user string);

}

Root.printout();
}
how do you implement the function addString() and printout() 你如何实现addString()和 printout()
the user may add 1 million strings, you have to store them and sort them quick. 用户可能会输入1百万个字符串,你必须储存它们并且要快速分类
tell me what the l