Lab 7Data Structures and AlgorithmsProblem 1: Heap1. (3 points) Create a new class Heap This class must implement the following two methods:(a) heapify which takes an array of integers as input and converts it into a max heap.(b) heapsort which takes an array and sorts it (ascending order)For heapsort you should call heapify method internally.2. (3 points) Create another class HeapTest for testing. You must follow the following steps:(a) Create an array arr containing the following elements:5, 18, 3, 25, 27, 45, 97, 88, 26, 16, 49, 67(b) Call heapify(arr)(c) Print elements in arr(d) Create another array arr2 containing the following elements:15, 99, 3, 77, 27, 45, 7, 88, 26, 5(e) call heapsort(arr2)(f) Print elements in arr2Note: For getting full credits for part 1, your part 2 must work correctly.Problem 2: Radix SortRadix Sort is typically implemented to support only a radix that is a power of two. This allows for a directconversion from the radix to some number of bits in an integer key value. For example, if the radix is 16, thena 32-bit key will be processed in 8 steps of 4 bits each. Re-implement (in Java) the Radix Sort implementationof the lecture (textbook) to use bit shifting in place of division. Use at least 5 test cases to compare the runningtime of the old and new Radix Sort implementations. Submit the Java code and your findings in a separate textfile.Note: Bitshifting operator >> (So 16 >> 1 is 8 because 1610 = 100002 and 10000 >> 1 = 10002 = 810.SubmissionCreate a zip file [YourNetID]_Lab7.zip containing your source code for Problem 1 and 2 and a README file.Submit this file at the appropriate location on the Blackboard system. The README file should state your andyour team member’s name and any other pertinent information. You should include the following Java files: Heap.java HeapTest.java RadixSort.javaLab 7 (Heaps) Page 1 / 2Grading (10 pts)Problem 1: 6 ptsProblem 2: 4 ptsLab 7 (Heaps) Page 2 / 2本团队核心人员组成主要包括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
网友评论