
CSP-Algorithm

Quiz
•
Science, Computers
•
University
•
Medium
闕河正 闕河正
Used 3+ times
FREE Resource
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Algorithm 1 calculates the correct sum, but algorithm 2 does not.
Algorithm 2 calculates the correct sum, but algorithm 1 does not.
Both algorithms calculate the correct sum.
Neither algorithm calculates the correct sum.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1/n
n^2
n
n^3
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A high school provides email addresses to freshman students. The email system typically assigns an email address in the format "firstname.lastname@coolschool.edu". However, if a student has the same name as a previous student, the system assigns them a different format.
In order to figure out whether an email address is already assigned, the system does a binary search through its list of existing email addresses.
Which of these statements is true?
The list of email addresses must be sorted for binary search to work.
In the worst case that the email address is not in the list, binary search will need to look at every item in the list.
The code for the binary search algorithm must be written in binary to achieve optimum efficiency.
The list of email addresses don't need to be sorted for binary search to work, but that would improve the efficiency of the algorithm.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Ryland is creating an article about commonly used compression algorithms for an online educational site.
He's debating whether to express each algorithm in natural language, flow charts, pseudocode, or C++, a general-purpose programming language.
Which of these is a good argument for expressing the algorithm in pseudocode?
Pseudocode can express more detail than natural language, flow charts, and C++.
Pseudocode doesn't depend on the syntax and subtleties of a particular programming language, so his readers will be able to understand it as long as they know at least one language.
Pseudocode can be understood by anyone, even those without any programming experience.
Pseudocode can run on any computer, so all his readers will be able to run the algorithm themselves.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1900 false
1984 true
2000 false
2002 false
1900 true
1984 true
2000 false
2002 false
1900 false
1984 true
2000 true
2002 false
1900 true
1984 true
2000 true
2002 false
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
解決同一個問題有a,b,c,d四個程式能做到,其時間複雜度分別為
A.6n^2
B.6n
C.1/n
D.2^n
請依據效能由好到壞排序(假設n很大)
C > B > A > D
B>D>A>C
D>B>C>A
A>B>C>D
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Yes, that test case is sufficient proof that the procedure works as intended for all possible lists of numbers.
No, since the expected return value is not [1, 2, 3, 4] for that test case.
No, but the programmer can conclude that it always works when generating lists that are 4 numbers long.
No, they've only verified that it works for that test case. Additional analysis and reasoning is necessary.
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Activity Quiz

Quiz
•
University
15 questions
PreTest DFC20113 - Programming Fundamentals

Quiz
•
University
18 questions
Lecture 2b: Solving Search Problems - Parte2

Quiz
•
University
12 questions
DAA_C_MCQ - 1

Quiz
•
University
20 questions
2.3.1 Graph Traversal & Path Finding Algorithms

Quiz
•
12th Grade - University
15 questions
Eng. S2 - #4 AI Part 1

Quiz
•
University
20 questions
Cloud Computing (Quiz 1)

Quiz
•
University
12 questions
Virtualization

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade