Search Header Logo

1027 Exam Prep

Authored by Nicole Moskovitch

Computers

University

Used 8+ times

1027 Exam Prep
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Indicate which of the following is an example of a non-linear collection

Stack

Queue

Tree

Both a and c are true

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The term "time complexity" is the measure of

how many basic operation needs to be executed

the duration of the program execution

the clock speed of the computer running the program

how long it takes to program the algorithm

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Indicate which statement is true regarding the time complexity of the pop() method on a stack

In ArrayStack, pop() has a time complexity of O(1)

 In ArrayStack, pop() has a time complexity of O(n)

In LinkedStack, pop() has a time complexity of O(1)

Both a and c are true

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How could you access the second element in a singly linked list, assuming front points to the first element of the linked list?

front[1]

 front.getNext() 

front.getNode(1) 

front.getList[1]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Indicate what would be printed to the console if we called the following function with: System.out.println(run(15))

-1

0

1

4

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

 Indicate what would be printed to the console if we called the following function with: System.out.println(work(3));

1

3

4

5

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When performing a postorder traversal on a binary search tree, the last node visited is:

The root node

The leftmost node

The rightmost node

The node with the largest value

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?