CSP-Algorithm

CSP-Algorithm

University

17 Qs

quiz-placeholder

Similar activities

U3BigData01

U3BigData01

University

18 Qs

Patologias Cardiovasculares

Patologias Cardiovasculares

University

17 Qs

Sains Komputer Tingkatan 5 - 1.3.1 Menerangkan get logik

Sains Komputer Tingkatan 5 - 1.3.1 Menerangkan get logik

1st Grade - Professional Development

20 Qs

Software Engineering Quiz 1

Software Engineering Quiz 1

University

20 Qs

CIS2303 Week 4_5 Ch_3

CIS2303 Week 4_5 Ch_3

University

18 Qs

ITF Chapter 1 Computing Devices

ITF Chapter 1 Computing Devices

University

14 Qs

Repaso inhibición enzimática

Repaso inhibición enzimática

University

20 Qs

GIT COURSE

GIT COURSE

University

13 Qs

CSP-Algorithm

CSP-Algorithm

Assessment

Quiz

Science, Computers

University

Practice Problem

Medium

Created by

闕河正 闕河正

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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

Media Image

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

Media Image

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

Media Image

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.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Science