logo

Crowdly

Browser

Додати до Chrome

Computer Science / Rekenaarwetenskap - 144

Шукаєте відповіді та рішення тестів для Computer Science / Rekenaarwetenskap - 144? Перегляньте нашу велику колекцію перевірених відповідей для Computer Science / Rekenaarwetenskap - 144 в stemlearn.sun.ac.za.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Consider building a reversed copy of a string s of length n. Because strings are immutable, the running time is:

reverse = ''

for i in range(n):

reverse = s[i] + reverse

0%
100%
0%
0%
Переглянути це питання

Appending n items one at a time to an initially empty Python list takes total time proportional to:

0%
0%
100%
0%
Переглянути це питання

What is the order of growth of x after this code runs?

x = 0

for i in range(n):

for j in range(n):

for k in range(n):

x += 1

100%
0%
0%
0%
Переглянути це питання

What is the order of growth of the running time of this function?

def f(n):

if n == 0:

return 1

return f(n-1) + f(n-1)

0%
0%
0%
100%
Переглянути це питання

You run a doubling test on two Section 4.2 sorting functions. For f the successive running-time ratios settle near 4; for g they settle near 2. Which pairing is correct?

100%
0%
0%
0%
Переглянути це питання

For which input does insertion sort run in LINEAR time in n?

100%
0%
0%
0%
Переглянути це питання

Using the text's memory model, an array (Python list) holding 1000 int objects (each in the normal 64-bit range) uses about:

0%
0%
100%
0%
Переглянути це питання

A program's worst-case running time is O(n²). According to the text, which statement is TRUE?

0%
100%
0%
0%
Переглянути це питання

For n a power of 2, mergesort is linearithmic because:

0%
100%
0%
0%
Переглянути це питання

In the worst case, the number of compares binary search uses on a sorted array of n keys has order of growth:

0%
0%
0%
100%
Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на stemlearn.sun.ac.za?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome