100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COSC 2436 Exam 1 Final Exam review Questions and Answers $11.99   Add to cart

Exam (elaborations)

COSC 2436 Exam 1 Final Exam review Questions and Answers

 7 views  0 purchase
  • Course
  • COSC
  • Institution
  • COSC

COSC 2436 Exam 1 Final Exam review Questions and Answers

Preview 2 out of 8  pages

  • August 24, 2024
  • 8
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • COSC
  • COSC
avatar-seller
millyphilip
COSC 2436 Exam 1 Final Exam review
Questions and Answers
The most significant contributor to an algorithm's time requirement is - Answer -the
algorithm's basic operation

Which of the following operations could be identified as the basic operation of an
algorithm? - Answer -all of the above

Which one of the following would not be a basic operation? - Answer -all of the above

For large values of n which statement is true?
2n^3 + 4n^2 behaves like n^3
2n^3 + 4n^2 + 17n behaves like n^3
all of the above
2n^3 behaves like n^3 - Answer -all of the above

For large values of n which statement is true? - Answer -(n^2 + n) / 2 behaves like n^2

Computing the sum of the first n integers using the formula n * (n + 1) / 2 has a growth
rate - Answer -independent of n

To properly evaluate the effectiveness of an algorithm, you need to determine - Answer
-all of the above

When search an array for a particular value, which case is most useful? - Answer -the
average case

If an algorithm requires 7 basic operations for an algorithm with a problem size of n, the
algorithmic complexity is - Answer -O(1)

Polish notation is another term for a(n) - Answer -prefix expression

Reverse polish notation is another term for a(n) - Answer -postfix expression

An expression that has correctly paired delimiters is called a(n) - Answer -balanced
expression

, Given the following infix expression, which one of the following is the corresponding
postfix expression? a + r ^ 2 - 5 - Answer -a r 2 ^ + 5 -

Given the following infix expression, which one of the following is the corresponding
postfix expression? w + x * y / z - Answer -w x y * z / +

Given the following infix expression, which one of the following is the corresponding
postfix expression?(a + b) * (c - d) / (e + f) - Answer -a b + c d - * e f + /

Using the evaluate Postfix algorithm, evaluate the following postfix expression. 7 2 + 4 *
- Answer -36

Using the evaluate Postfix algorithm, evaluate the following postfix expression. a b + c d
- *Assume that a = 5, b = 7, c = 6, and d = 2. - Answer -48

Using the evaluate Postfix algorithm, evaluate the following postfix expression. w x + y*
z /Assume that w = 3 , x = 4, y = 2, z = 7. - Answer -2

What object behaves like a high-level array? - Answer -vector

In the Java Class Library, the default constructor Vector creates an empty vector with
an initial capacity of - Answer -10

When a vector needs to increase its size - Answer -the capacity is doubled

Which method accesses the last entry of a vector? - Answer -lastElement

In a vector implementation of a Stack ADT (abstract data type), you add an entry to the
top of a stack using which vector method? - Answer -add

In a vector implementation of a Stack ADT (abstract data type), you retrieve the top
entry without removing it using which vector method? - Answer -lastElement

In a vector implementation of a Stack ADT (abstract data type), you remove an entry
from the top of a stack using which vector method? - Answer -remove

In a vector implementation of a Stack ADT (abstract data type), you check for an empty
stack using which vector method? - Answer -isEmpty

In a vector implementation of a Stack ADT (abstract data type), you clear all of the
contents of a stack using which vector method? - Answer -clear

A common alias for the queue method dequeue is - Answer -all of the above

A common alias for the queue method getFront is - Answer -peek

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 millyphilip. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73091 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
$11.99
  • (0)
  Add to cart