Write a C++ program。。。求助~!~!~!~!
①Write a C++ program which will read from a file a 25x25 grid of letters, followed by 10 words. Your program should find each of the words and output to a file the location (the top left corner is (0,0)) and the direction (up, down, right, left, digonal up-left, diagonal up-right, diagonal down-left, or diagonal down-right). All letters/words are UPPERCASE. Moodle has a sample input file to use。写一个c++程序将阅读文件25 x25网格的字母,其次是10个字。你的程序应该发现每一个的单词和输出到一个文件的位置(左上角是(0,0)和方向(上、下、右、左、digonal up-left、斜交up-right,或者斜对角down-left,down-right)。所有的字母/单词都是大写。Moodle拥有一个试样输入文件的使用。
②Write two different implementations of a hash table for strings (your choice of C char * or C++ string class). One implementation should use chaining to handle collisions; the other should use double-hashing.
Test your tables with two data sets: One with a number of strings equal around 50-60% of the size of the hash table, and one with number of strings equal to around 95-100% of the size of the hash table.
Compare your two implementations (Which one gives better performance? Which was easier to code/debug? Any difference in behavior for the two data sets?)
写出两个不同的实现的一个哈希表中搜索字符串(你选择的C或c++炭*串级)。一种实现应该用链处理碰撞;另一个应该使用double-hashing。
测试你的表与两个数据集:一个拥有一批字符串平等在50 - 60%的哈希表的大小,另一种是不带线的数量相当于大约95 - 100%的尺寸的哈希表。
把你的两个实现(一个提供更好的业绩?这是比较容易的代码/调试呢?任何行为的两个不同的数据集吗?)
这是两个别人给我做的题目,小弟我英语水平太烂了,根本看不懂题目,后面的中文也是从在线翻译上搞来的,实在弄不懂意思,所以知道到论坛上来求助各位大虾了,还望各位不吝赐教啊~!~!~