美文网首页
代做TreeSets作业、代写D2L Dropbox作业、Pyt

代做TreeSets作业、代写D2L Dropbox作业、Pyt

作者: flm9873 | 来源:发表于2019-02-26 13:15 被阅读0次

Project 3: TreeSetsDue: Friday Mar 1, 11:59 pm1 Assignment OverviewFor this project you will be implementing a tree set. Your set will be used to track membership in a group.Items will be sorted based on a comparison function supplied to the tree upon creation.2 Assignment DeliverablesYou must turn in completed versions of the following files: TreeSet.pyBe sure to use the specified file name and to submit your files for grading via D2L Dropbox before theproject deadline.3 Assignment SpecificationsYour task will be to complete the methods listed below: len height insert remove contains first last clear is disjoint iterYour implementation of len, height and clear should run in constant time. Your implementation ofis disjoint should run O(n + m), where n and m are the sizes of the given two sets. iter can take upto O(n) time total to complete an in-order traversal of the items. The other methods must have O(log n)guaranteed time. Your set must use O(n) space.1The first and last methods should raise a KeyError if the set is empty. No other exceptions shouldbe thrown.The insert and remove functions return a Boolean value to indicate whether the operation succeededor failed. Being a set, duplicate items are not allowed.The sequence of elements generated by your TreeSet’s iterator will be in an order determined by acomparison function, comp, supplied to its constructor. comp(a, b) compares items a and b, returning anegative value if a b, and 0 if a = b. You should not use thenatural ordering (that is the (such as sorting elements in reverse order or using a case-insensitive order for strings).You should include comments where appropriate. In particular, you should describe the overall methodused to balance your tree. You must also add documentation for each of the above methods (as well as forany helper functions created) in the same style as for the pre-defined methods.4 Assignment Notes Points will be deducted if your solution has warnings of any type. You have been supplied with stubs for the required methods. You must complete these methods tocomplete the project. You may add more functions than what was provided, but you may not modifythe signatures of the provided methods. You do not have to worry about error checking for valid input. You may assume that the suppliedreader function correctly reads the input file. You do have to worry about accessing elements from an empty tree. You must be able to handle duplicate or non-existent elements. Remember that sets do not allow duplicate items. Implementations for is empty and repr have been provided. Note that these rely on the len and iterfunctions, respectively, so you may want to complete these functions early. You have been provided with some unit tests that can be used to assess your solution. There areadditional test cases that will be kept hidden. It is your responsibility to check for potential edge cases. The supplied unit tests do not account forall possible valid inputs The comp property is a function pointer that determines the ordering of objects. You can invoke itwith comp(a, b) just like you would for a regular function. It returns -1 if a a == b. You should not use the objects’ natural ordering. For the iter method, you may want to use the yield keyword. The supplied main file will read in the phonetic alphabet. In the case-insensitive order, there shouldbe 26 items which will spell out the phonetic alphabet in order (there are some additional items thatare removed before the end). In the string’s natural ordering, they will appear in a different order.There will also be 27 items (both ‘sierra’ and ‘Sierra’ will be in the set). You may find it helpful to add additional methods or classes. You may not use any of the classes in the collections module or the set class.本团队核心人员组成主要包括硅谷工程师、BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

相关文章

网友评论

      本文标题:代做TreeSets作业、代写D2L Dropbox作业、Pyt

      本文链接:https://www.haomeiwen.com/subject/pqdayqtx.html