100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSC 221 Exam 1 Questions and Answers $12.99   Add to cart

Exam (elaborations)

CSC 221 Exam 1 Questions and Answers

 0 view  0 purchase
  • Course
  • CSC - Cyber Secure Coder
  • Institution
  • CSC - Cyber Secure Coder

CSC 221 Exam 1 Questions and Answers Three sock types A, B, C exist in a drawer. Pulled socks are kept and not returned. Which is true? If the first two pulls are different socks, only one more pull is needed for a match If the first three pulls are different socks, only one more pull is neede...

[Show more]

Preview 2 out of 5  pages

  • September 22, 2024
  • 5
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSC - Cyber Secure Coder
  • CSC - Cyber Secure Coder
avatar-seller
Pogba119
CSC 221 Exam 1 Questions and Answers
Three sock types A, B, C exist in a drawer. Pulled socks are kept and not returned.
Which is true?

If the first two pulls are different socks, only one more pull is needed for a match
If the first three pulls are different socks, only one more pull is needed for a match
If the first two pulls are different socks, at least two more pulls are needed for a match
If the first three pulls are different socks, at least two more pulls are needed for a match
- answer If the first three pulls are different socks, only one more pull is needed for a
match

Which real-life activity is similar to doing a binary search?

Looking for a matching sock in a drawer full of socks
Looking up Pizza Hut in the phone book
Looking for a house address on a residential street
Looking for a largest number in an unsorted array - answer Looking up Pizza Hut in
the phone book

Which converts a programming language's source code into machine code?

interpreter
translator
converter
compiler - answer compiler

Which programming language is compiled and statically typed, but not object-oriented?

C
C++
Java
Python - answer C

Which programming language is interpreted, dynamically typed, and object-oriented?

C++
HTML
Java
Python - answer Python

Which algorithm solves the problem for finding the minimum of 5 values, such as 3 6 -1
8 4?

, min = first value
for each value
if value < min
min = value

min = first value
for each value
if value > min
min = value

min = first value
for each value
if value == min
min = value

min = first value
for each value
if value < 0
min = value - answer min = first
valuefor each value
if value < min
min = value

Consider the problem of determining the longest word in a list of words with various
lengths. What is the problem input / output?

String value for the longest word / Integer value for the number of words
String value for the longest word / Array of all words
Array of all words / String value for the longest word
Integer value for the number of words / String value for the longest word - answer
Array of all words / String value for the longest word

Which common algorithm should be used to quickly find Pizza Hut in the phone book?

Binary search
Linear search
Longest common substring
Shortest path algorithm - answer Binary search

Which is true if an efficient solution for one NP-complete problem is found?

The algorithm has exponential runtime
There is an efficient algorithm for all other NP-complete problems
Other NP-complete problems are not affected, and don't have efficient algorithms
The al - answer There is an efficient algorithm for all other NP-complete problems

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

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

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