CCDSALG Practice Questions
Quiz
•
Education
•
University
•
Medium
Romualdo Bautista
Used 3+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given: sum = 0 for i = 0 to n: for j = 0 to i: sum += j What is the time complexity?
O(n)
O(n log n)
O(n²)
O(n³)
Answer explanation
The inner loop runs i times for each i, leading to 1 + 2 + 3 + ... + n = O(n²) operations.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Let f(n) = 4n² + 6n + 1, g(n) = n². Which is true?
f(n) = O(g(n))
f(n) = Ω(g(n))
f(n) = Θ(g(n))
All of the above
Answer explanation
Since both upper and lower bounds are tightly n2n^2n2, it's Θ. Hence, also O and Ω.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function has the slowest growth rate?
log²n
√n
n log n
n²
Answer explanation
Logarithmic growth is slower than root or linear-log.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Let f(n) = 10n + 50, and g(n) = n. Which constants satisfy f(n) ≤ cg(n)?
c = 60, n₀ = 1
c = 10, n₀ = 5
c = 12, n₀ = 10
c = 5, n₀ = 20
Answer explanation
f(n)=10n+50≤60n is true for n≥1.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Convert (3 + 6) * (4 - 2) into prefix:
* + 3 6 - 4 2
+ 3 6 * - 4 2
+ * 3 6 4 2
* 3 6 - 4 2
Answer explanation
Prefix = operator before operands: * + 3 6 - 4 2.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Quadratic probing, collision at index 2.
What is the probing sequence?
3, 6, 11
3, 7, 2
3, 4, 5
3, 5, 8
Answer explanation
Quadratic probing: i² offset. 2+1²=3, 2+2²=6, 2+3²=11→mod size if needed.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Data structure for infix to postfix conversion?
Queue
Stack
Tree
Graph
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
13 questions
SDG YOUTH DIALOGUE 24'
Quiz
•
University
10 questions
Test 1 - LLDH
Quiz
•
University
10 questions
FUNN QUIS
Quiz
•
University
10 questions
Simple Quiz
Quiz
•
KG - Professional Dev...
20 questions
MGT Chapter 8
Quiz
•
University
20 questions
RBTS3093 PEDAGOGI REKA BENTUK DAN TEKNOLOGI SEKOLAH RENDAH
Quiz
•
University
10 questions
24/25學年_小學(中文部)_小五_常識科_小測二
Quiz
•
5th Grade - University
10 questions
Tipología textual
Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Education
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University