Search Header Logo

PrelimExam-DSA-FCPC

Authored by ALVIN CERTEZA

Others

University

Used 4+ times

PrelimExam-DSA-FCPC
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the time complexity of accessing an element in a Python list by index?

O(1)

O(n)

O(log n)

O(n²)

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the average time complexity of searching for an element in an unsorted linked list?

O(1)

O(n)

O(log n)

O(n log n)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The time complexity of appending an element to a Python list (average case) is:

O(1)

O(n)

O(log n)

O(n²)

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which operation on a singly linked list requires O(n) time?

Traversal

Access by index

Searching

All of the above

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the best case time complexity of inserting at the head of a linked list?

O(n)

O(log n)

O(1)

O(n²)

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the space complexity of storing a string of length n in Python?

O(1)

O(n)

O(n²)

O(log n)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which operation in Python strings has O(n) complexity?

Indexing

Concatenation

Slicing

Both b and c

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?