Discovering Computers ©2018: Digital Technology, Data, and Devices
Discovering Computers ©2018: Digital Technology, Data, and Devices
1st Edition
ISBN: 9781337285100
Author: Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Jennifer T. Campbell, Mark Frydenberg
Publisher: Cengage Learning
Question
Book Icon
Chapter 12, Problem 17SG
Program Plan Intro

Licensed software:

  • The licensed software is the legalized software that includes zero errors and bugs.
  • The copyright and patent rights of the software lie within the hands of the owner.
  • He/she has all the rights to create the copies of the software. The software will be protected in both source code and object code.

Blurred answer
Students have asked these similar questions
Suppose that the MinGap method below is added to the Treap class on Blackboard. public int MinGap ( ) Returns the absolute difference between the two closest numbers in the treap. For example, if the numbers are {2, 5, 7, 11, 12, 15, 20} then MinGap would returns 1, the absolute difference between 11 and 12. Requirements 1. Describe in a separate Design Document what additional data is needed and how that data is used to support an time complexity of O(1) for the MinGap method. Show as well that the methods Add and Remove can efficiently maintain this data as items are added and removed. (6 marks) 2. Re-implement the methods Add and Remove of the Treap class to maintain the augmented data in expected O(log n) time. (6 marks) 3. Implement the MinGap method. (4 marks) 4. Test your new method thoroughly. Include your test cases and results in a Test Document. (4 marks)
Suppose that the two Rank methods below are added to the Skip List class on Blackboard. public int Rank (T item) Returns the rank of the given item. public T Rank(int i) Returns the item with the given rank i. Requirements 1. Describe in a separate Design Document what additional data is needed and how that data is used to support an expected time complexity of O(log n) for each of the Rank methods. Show as well that the methods Insert and Remove can efficiently maintain this data as items are inserted and removed. (7 marks) 2. Re-implement the methods Insert and Remove of the Skip List class to maintain the augmented data in expected O(log n) time. Using the Contains method, ensure that added items are distinct. (6 marks) 3. Implement the two Rank methods. (8 marks) 4. Test your new methods thoroughly. Include your test cases and results in a Test Document. (4 marks)
Suppose that the two Rank methods below are added to the Skip List class on Blackboard. public int Rank (T item) Returns the rank of the given item. public T Rank(int i) Returns the item with the given rank i. Requirements 1. Describe in a separate Design Document what additional data is needed and how that data is used to support an expected time complexity of O(log n) for each of the Rank methods. Show as well that the methods Insert and Remove can efficiently maintain this data as items are inserted and removed. (7 marks) 2. Re-implement the methods Insert and Remove of the Skip List class to maintain the augmented data in expected O(log n) time. Using the Contains method, ensure that added items are distinct. (6 marks) 3. Implement the two Rank methods. (8 marks) 4. Test your new methods thoroughly. Include your test cases and results in a Test Document. (4 marks)

Chapter 12 Solutions

Discovering Computers ©2018: Digital Technology, Data, and Devices

Ch. 12 - Prob. 11SGCh. 12 - Prob. 12SGCh. 12 - Prob. 13SGCh. 12 - Prob. 14SGCh. 12 - Prob. 15SGCh. 12 - Prob. 16SGCh. 12 - Prob. 17SGCh. 12 - Prob. 18SGCh. 12 - Prob. 19SGCh. 12 - Prob. 20SGCh. 12 - Prob. 21SGCh. 12 - Prob. 22SGCh. 12 - Prob. 23SGCh. 12 - Prob. 24SGCh. 12 - Prob. 25SGCh. 12 - Prob. 26SGCh. 12 - Prob. 27SGCh. 12 - Prob. 28SGCh. 12 - Prob. 29SGCh. 12 - Prob. 30SGCh. 12 - Prob. 31SGCh. 12 - Prob. 32SGCh. 12 - Prob. 33SGCh. 12 - Prob. 34SGCh. 12 - Prob. 35SGCh. 12 - Prob. 36SGCh. 12 - Prob. 37SGCh. 12 - Prob. 38SGCh. 12 - Prob. 39SGCh. 12 - Prob. 40SGCh. 12 - Prob. 41SGCh. 12 - Prob. 42SGCh. 12 - Prob. 43SGCh. 12 - Prob. 44SGCh. 12 - Prob. 45SGCh. 12 - Prob. 1TFCh. 12 - Prob. 2TFCh. 12 - Prob. 3TFCh. 12 - Prob. 4TFCh. 12 - Prob. 5TFCh. 12 - Prob. 6TFCh. 12 - Prob. 7TFCh. 12 - Prob. 8TFCh. 12 - Prob. 9TFCh. 12 - Prob. 10TFCh. 12 - Prob. 11TFCh. 12 - Prob. 12TFCh. 12 - Prob. 1MCCh. 12 - Prob. 2MCCh. 12 - Prob. 3MCCh. 12 - A(n) _____ report consolidates data usually with...Ch. 12 - Prob. 5MCCh. 12 - Prob. 6MCCh. 12 - Prob. 7MCCh. 12 - Prob. 8MCCh. 12 - Prob. 1MCh. 12 - Prob. 2MCh. 12 - Prob. 3MCh. 12 - Prob. 4MCh. 12 - Prob. 5MCh. 12 - Prob. 6MCh. 12 - Prob. 7MCh. 12 - Prob. 8MCh. 12 - Prob. 9MCh. 12 - Prob. 10MCh. 12 - Prob. 2CTCh. 12 - Prob. 3CTCh. 12 - Prob. 4CTCh. 12 - Prob. 5CTCh. 12 - Prob. 6CTCh. 12 - Prob. 7CTCh. 12 - Prob. 8CTCh. 12 - Prob. 9CTCh. 12 - Prob. 10CTCh. 12 - Prob. 11CTCh. 12 - Prob. 12CTCh. 12 - Prob. 13CTCh. 12 - Prob. 14CTCh. 12 - Prob. 15CTCh. 12 - Prob. 16CTCh. 12 - Prob. 17CTCh. 12 - Prob. 18CTCh. 12 - Prob. 19CTCh. 12 - Prob. 20CTCh. 12 - Prob. 21CTCh. 12 - Prob. 22CTCh. 12 - Prob. 23CTCh. 12 - Prob. 24CTCh. 12 - Prob. 25CTCh. 12 - Prob. 26CTCh. 12 - Prob. 27CTCh. 12 - Prob. 28CTCh. 12 - Prob. 29CTCh. 12 - Prob. 1PSCh. 12 - Prob. 2PSCh. 12 - Prob. 3PSCh. 12 - Prob. 4PSCh. 12 - Prob. 5PSCh. 12 - Prob. 6PSCh. 12 - Prob. 7PSCh. 12 - Prob. 8PSCh. 12 - Prob. 9PSCh. 12 - Prob. 10PSCh. 12 - Prob. 11PSCh. 12 - Prob. 1.1ECh. 12 - Prob. 1.2ECh. 12 - Prob. 1.3ECh. 12 - Prob. 2.1ECh. 12 - Prob. 2.2ECh. 12 - Prob. 3.1ECh. 12 - Prob. 3.2ECh. 12 - Prob. 1IRCh. 12 - Prob. 2IRCh. 12 - Prob. 4IRCh. 12 - Prob. 5IRCh. 12 - Prob. 1CTQCh. 12 - Prob. 3CTQCh. 12 - Prob. 4CTQ
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Enhanced Discovering Computers 2017 (Shelly Cashm...
Computer Science
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Cengage Learning
Text book image
CMPTR
Computer Science
ISBN:9781337681872
Author:PINARD
Publisher:Cengage