Search Header Logo

In class Q4

Authored by Farah Habib

Computers

University

Used 4+ times

In class Q4
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An ADT most closely resembles a(n) ______, whereas a data structure most closely resembles a(n) ______.

Interface, Class

Class, Interface

Static method, instance method

instance method, static method

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The runtime complexity for retrieving the object at a given index in an array-based list is _____.

Constant

Linear

Quadratic

None of these

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The runtime complexity for retrieving the object at a given index in a linked list is ___.

Constant

Linear

Quadratic

None of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which ADT would be best for supporting the 'go back' functionaility of a web browser?

List

Queue

Stack

None of these

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If you are working with a HashMap called X, how can you change the value associated with the key Y to be Z?

X.set(Y, Z)

X.set(Z, Y)

X.put(Y, Z)

X.put(Z, Y)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What should the following code output?

0

1

2

3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What should the following code print?

0

1

2

3

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?