Search Header Logo

ADS ULTRA (AITU)

Authored by Pavel Lukoyanov

Computers

University

Used 1+ times

ADS ULTRA (AITU)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

153 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the time complexity for adding an element to the end of Linked List?

O(1)
O(Nˆ2)
O(logN)
O(N)

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is not the type of queue?

Ordinary queue
Circular queue
Priority queue
Single ended queue

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is double-linked list?

each node points to the next node
last node points to the first
each node points to all previous nodes
each node points to the next and previous nodes

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which among the following is the worst-case time complexity for appending an element in a variable-length array?

O(n)
O(n2)
O(log n)
O(1)

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Specify ArrayList advantages over LinkedList

arrayList is better for manipulating the data
adding and removing an element
less memory usage
increasing the size

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the result of nested statements/loops or recursion?

O(1)
O(n^2 + n)
O(n^2)
O(n)

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

We can use the following recursive function to search an array of sorted numerical values to find a specific number in that array (or return -1 if the value isn't in the array): function searchSortedArray(number, array, beginIndex = 0, endIndex = array.length - 1) { let middleIndex = Math.floor((beginIndex + endIndex)/2); if (array[middleIndex] === number)  {    return middleIndex;  } else if (beginIndex >= endIndex)  {    return -1;  } else if (array[middleIndex] < number)  {    beginIndex = middleIndex + 1;    return searchSortedArray(number, array, beginIndex, endIndex);  } else if (array[middleIndex] > number)  {    endIndex = middleIndex - 1;    return searchSortedArray(number, array, beginIndex, endIndex);  } }

O(n*n)
O(nlogn)
O(logn)
O(n)

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?