讲解:C CS261 HOMEWORK 3R、R

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom阅读 7,624评论 0 3
  • 如果你经常追问意义与答案,无论兜了多少圈子,最后会发现,最终的命题从来不是i can,而是i will 因为只要你...
    sss雪阅读 1,722评论 1 0
  • 一生遇到了好多人, 以为可以相识永远, 后来都成了过客, 以前想要好多朋友, 可以说好多的话, 习惯孤独后, 就再...
    莫云扬阅读 1,137评论 2 3
  • 我相信,天下每一位父母,都是深爱自己孩子的,都想把世界上最好一切,奉献给自己的宝贝! 爸爸妈妈对孩子的爱,是自然的...
    06暖阳阅读 1,079评论 0 0