Search Header Logo

Lists and Linked Lists

Authored by Mr Applewhaite

Computers

12th Grade

Used 1+ times

Lists and Linked Lists
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

26 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a list in computer science?

A static data structure with fixed size

An abstract data type consisting of a number of items

A type of database management system

A programming language

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operation would you use to add a new item to the end of a list?

remove(item)

append(item)

index(item)

pop()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the operation isEmpty() check for in a list?

If the list contains a specific item

If the list is sorted

If the list is empty

If the list has more than one item

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you remove and return the last item in a list?

pop()

remove(item)

index(item)

append(item)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the example list [45, 13, 19, 13, 8], what is the return value of a.length()?

4

5

6

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assume that list names holds the values James, Paul, Sophie, Holly, Nathan. What does the list hold after each of the following consecutive operations? (i) names.append("Tom") (ii) names.pop(3) (iii) names.insert(1, "Melissa")

['James', 'Melissa', 'Paul', 'Sophie', 'Tom', 'Nathan']

['James', 'Paul', 'Melissa', 'Sophie', 'Holly', 'Tom']

['James', 'Melissa', 'Paul', 'Sophie', 'Holly', 'Tom', 'Nathan']

['James', 'Paul', 'Sophie', 'Holly', 'Melissa', 'Tom']

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suggest a different algorithm for adding a new element to a sequenced list.

Use a stack to add the element

Use a queue to add the element

Use binary search to find the position and insert

Use a hash table to add the element

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?