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
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...