logo

Crowdly

Browser

Add to Chrome

CMPT 140 A - Intro Computing Science & Program I (FA 2025)

Looking for CMPT 140 A - Intro Computing Science & Program I (FA 2025) test answers and solutions? Browse our comprehensive collection of verified answers for CMPT 140 A - Intro Computing Science & Program I (FA 2025) at learn.twu.ca.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Consider the following big-Oh growth rates:

O(1)
O(2n)
O(n)
O(n2)

Which big-Oh growth rate is least desireable?

View this question

An algorithm requires a total of 3n3 + 2n2 – 3n + 4 visits. In big-Oh notation, the total number of visits is of what order?

View this question

What is the last output line of the code snippet given below?

for i in range(3) :
   for j in  range(5) :
      if i % 2 ==  j % 2 :
         print("*", end="")
      else :
         print(" ", end="")
   print()
View this question
Binary search is an ____ algorithm.
View this question
A binary search ____ a linear search.
View this question

After 9 iterations of selection sort working on an list of 10

elements, what must hold true?

View this question
What is the output of the code snippet given below?
i = 0
while i != 9 :
   print(i, end = " ")
   i = i + 2
View this question

What is the output of the following code fragment?

i = 1
sum = 0
while i <= 11 :
   sum = sum + i
   i = i + 1
print("The value of sum is", sum)
0%
0%
0%
0%
View this question

A linear search has an advantage over other algorithms because of its ________.

0%
0%
0%
0%
0%
View this question

In the best-case scenario in linear search with an array, how many comparisons are needed?

0%
0%
0%
0%
View this question

Want instant access to all verified answers on learn.twu.ca?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome