Introduction按照注释要求完成各函数功能,调用test()后输出如截图所示部分代码示例:/ Merge two skip lists, by adding elements of skip list 2 to skip list 1that are not already contained in skip list 1.The function is also supposed to remove the entire skip list 2 from the memory.param: slst1 – pointer to the skip list 1param: slst2 – pointer to the skip list 2pre: slst1 and slst2 are not null, and skip list 1 and skip list 2 are not emptypost: slst1 points to the merger skip list, slst2 is null/void mergeSkipList(struct skipList slst1, struct skipList slst2){struct skipLink Element;TYPE e;Element=slst2->topSentinel;while(Element->down!=NULL){Element=Element->down;}while(Element->next!=NULL){e=Element->next->value;removeSkipList(slst2,e);addSkipList(slst1,e);}/ FIX ME/} / end of the function /RequirementCS261: HOMEWORK 3Due 05/19/2017 by 12pmSubmit one file via the TEACH website:General InstructionsIn this assignment, you will complete the implementation of a skip list, which consists of singly-linkedlists. The header file skipList.h , the implementation file skipList.c , and makefile are provided toC代写 CS261 HOMEWORK 3调试R作业、R课程设计代写留学生 you.Some functions in the implementation file skipList.c have been completed. The comments for eachfunction will help you understand what each function should be doing. Complete the remaining functionsin skipList.c . Note that the function that carries the largest number of points is supposed to merge twoskip lists without repeating data elements . You should use the available functions to implementmore complex ones. DO NOT change the provided functions and the header file. If you have any questionsregarding HW3, please email .Provided Files:• skipList.h• skipList.cScoring:1) void test(void); 10pts2) struct skipLink skipLinkAdd(struct skipLinkcurrent, TYPE e); 10pts3) void addSkipList(struct skipListslst, TYPE e);20pts4) void printSkipList(struct skipListslst);20pts5) void mergeSkipList(struct skipListslst1, struct skipList * slst2);40ptsWhat to turn inYou will submit the completed file skipList.c . Please use this file-naming convention. Make sureyour code compiles with the provided makefile on the ENGR server. Zero tolerance for compiling errors.Design a number of test examples to thoroughly check for any errors in your code.转自:http://ass.3daixie.com/2019030716031177.html
讲解:C CS261 HOMEWORK 3R、R
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。