100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Test Bank For MindTap for Java Data Structures - 1st - 2020 All Chapters - 9780357636510 $14.89   Add to cart

Exam (elaborations)

Test Bank For MindTap for Java Data Structures - 1st - 2020 All Chapters - 9780357636510

 6 views  0 purchase
  • Course
  • Unknown
  • Institution
  • Unknown

Test Bank For MindTap for Java Data Structures - 1st - 2020 All Chapters

Preview 4 out of 201  pages

  • August 30, 2023
  • 201
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
book image

Book Title:

Author(s):

  • Edition:
  • ISBN:
  • Edition:
  • Unknown
  • Unknown
avatar-seller
TestBank2023
Test Bank For MindTap for Java Data Structures Chapter 01 1.How many solutions are possible for a problem?
a. Multiple
b. 1
c. 0
d.One for each possible Big O category
Analysis: a.Correct. There are many approaches for implementing an algorithm to solve a problem. See
Module 1 : Algorithms and Complexities, Lesson 1.1: Developing Our First Algorithm .
b.Incorrect. There is the most efficient algorithm, but other algorithms for a problem are also
possible. See Module 1 : Algorithms and Complexities, Lesson 1.1: Developing Our First
Algorithm .
c.Incorrect. There is always an algorithm for a problem, although some algorithms are very
inefficient. See Module 1 : Algorithms and Complexities, Lesson 1.1: Developing Our First
Algorithm .
d.Incorrect. Different algorithms exist and have different Big O performance, but not all possible Big
O performance have an algorithm. See Module 1 : Algorithms and Complexities, Lesson 1.1:
Developing Our First Algorithm .
2.What is used to determine the right algorithm for a problem?
a.Performance and memory requirements
b.Runtime platform
c.Programming language
d.Type of data input
Analysis: a.Correct. The best metric is performance, and then memory efficiency, in choosing an algorithm
for a problem. See Module 1: Algorithms and Complexities, Lesson 1.1: Developing Our First
Algorithm.
b.Incorrect. The metrics of an algorithm are independent of the runtime platform. See Module 1 :
Algorithms and Complexities, Lesson 1.1: Developing Our First Algorithm .
c.Incorrect. Any programming language can implement an algorithm. See Module 1 : Algorithms
and Complexities, Lesson 1.1: Developing Our First Algorithm .
d.Incorrect. An algorithm is described and evaluated by the Big O performance and memory
requirements, not the type of data processed. See Module 1 : Algorithms and Complexities,
Lesson 1.1: Developing Our First Algorithm .
3.Which of the following is a disadvantage of the Minimum Distance algorithm?
a.The algorithm i s inefficient for huge amount of data
b.The algorithm uses too much memory
c.The algorithm needs a faster runtime platform
1 Test Bank For MindTap for Java Data Structures Chapter 01 d. It computes the maximum distance Analysis: a. Correct. The Minimum Distance algorithm cannot handle or process huge amount of input data – it becomes inefficient. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . b. Incorrect. The algorithm performance is slow and is not related to memory use. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . c. Incorrect. The algorithm is inefficient because of increased input data size and is not related to the runtime platform. See Module 1 : Algorithms and Complexitie s, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . d. Incorrect. The minimum distance is computed, but the algorithm becomes slow and inefficient for increased input data size. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . 4. What is the effect of increased load on an algorithm? a. Efficient algorithms will not increase their use of resources b. Performance degrades c. Algorithm has a different Big O complexity d. Memory use increases Analysis: a. Correct. The most efficient algorithm will slowly increase their use of resources while not degrading in performance and speed. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . b. Incorrect. It depends on the algorithm – some algorithms perform better with increased load. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . c. Incorrect. The Big O complexity of an algorithm for the best, average, and worst cases is immutable. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . d. Incorrect. It usually depends on the algorithm if more memory is r equired for a larger load. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . 5. Which of the following is a method for quickly determining the efficiency of an algorithm? a. Plot the relation between the load size and the resource use for an algorithm b. Run the algorithm c. Check memory use d. Compare with the best known algorithm Analysis: 2 Test Bank For MindTap for Java Data Structures Chapter 01 a. Correct. A plot of problem size to time quickly reveals the functional curve that identifies the algori thm efficiency. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . b. Incorrect. Running the algorithm tests it, but the data for size and time are needed to compare with a plot. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . c. Incorrect. Memory utilization is a characteristic of an algorithm, but time performance is the most important factor. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . d. Incorrect. The best known algorithm is only the best known until a better algorithm is created. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . 6. What is described by a runtime complexity of O(1)? a. Algorithm efficiency is independent of the problem size, and is the fastest b. There is a limit on performance c. Memory use is inefficient d. Constant 1 needs to be removed Analysis: a. Correct. A constant time algorithm is the fastest regardless of the size of the data input. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . b. Incorrect. Linear O(1) algorithms can scale to any problem size. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . c. Incorrect. Linear O(1) algorithms' performance is not necessarily related to input size of the problem. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . d. Incorrect. O(1) is constant with no higher terms in the Big O notation. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmi c Complexity with Big O Notation . 7. Which of the following are polynomial algorithm runtime complexities? a. O(n^3) and O(n^4) b. O(log n) and O(n) c. O(1) and O(n) d. O(1) and O(log n) Analysis: a. Correct. Many algorithms are polynomial in performance but have different performance and speed when executed. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . 3 Test Bank For MindTap for Java Data Structures Chapter 01 b. Incorrect. A polynomial complexity is denoted as O(n^k) , where k is non -fractional integer. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . c. Incorrect. A polynomial complexity is denoted as O(n^k) , where k is non -fractional integer. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . d. Incorrect. A polynomial complexity is denoted as O(n^k) , where k is non -fractional integer. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . 8. Which of the following algorithm complexity is slower than polynomial complexity? a. O(k^n) b. O(n) c. Product of two linear algorithms d. O(1) Analysis: a. Correct. The slower algorithms are exponential and factorial algorithms. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . b. Incorrect. Linear O(n) algorithms have faster efficiency. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . c. Incorrect. The product of two linear algorithms is O(n^2), which is polynomial hence not necessarily slower. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . d. Incorrect. A constant O(1) algorithm is faster even for a large input data size. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . 9. Which algorithm efficiency is slower on a smaller input? a. Logarithmic algorithm efficiency b. Constant algorithm efficiency c. Linear algorithm efficiency d. Polynomial algorithm efficiency Analysis: a. Correct. Often, the more efficient algorithms are terrible for small problem sizes. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . b. Incorrect. A constant O(1) algorithm is faster for smaller input. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . c. Incorrect. A linear algorithm is faster for smaller input. See Module 1 : Algorithms and Complexities, Lesson 1.2: Measuring Algorithmic Complexity with Big O Notation . 4

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller TestBank2023. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $14.89. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76669 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$14.89
  • (0)
  Add to cart