Python Data Structures and Algorithms Quiz

Python Data Structures and Algorithms Quiz

Professional Development

41 Qs

quiz-placeholder

Similar activities

Tin học mô đun 3

Tin học mô đun 3

Professional Development

40 Qs

Git y GithHub y arrays y sus metodos

Git y GithHub y arrays y sus metodos

Professional Development

41 Qs

37. For loop

37. For loop

Professional Development

40 Qs

QUIZ TIK

QUIZ TIK

Professional Development

40 Qs

AWS Database & Networking

AWS Database & Networking

Professional Development

45 Qs

EXCEL QUIZ 1.

EXCEL QUIZ 1.

9th Grade - Professional Development

38 Qs

Algorithm Quiz

Algorithm Quiz

Professional Development

46 Qs

গ্রাফিক্স ডিজাইন কুইজ

গ্রাফিক্স ডিজাইন কুইজ

Professional Development

38 Qs

Python Data Structures and Algorithms Quiz

Python Data Structures and Algorithms Quiz

Assessment

Quiz

Computers

Professional Development

Hard

Created by

nature mind

Used 1+ times

FREE Resource

41 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of appending an element to a list in Python?

O(1)

O(log n)

O(n)

O(n²)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? def mystery_function(arr): return [x**2 for x in arr if x % 2 == 0] print(mystery_function([1, 2, 3, 4, 5]))

[1, 4, 9, 16, 25]

[4, 16]

[2, 4]

None

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the space complexity of a recursive function?

O(1)

O(n)

O(n log n)

O(log n)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data structure follows First In, First Out (FIFO)?

Stack

Queue

Array

Linked List

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? def find_duplicates(arr): return len(arr) != len(set(arr)) print(find_duplicates([1, 2, 3, 4, 1]))

True

False

[1, 2, 3, 4]

[1]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true for a binary search?

The list must be unsorted

The list must be sorted

The list can be unsorted or sorted

The list can only contain negative integers

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the space complexity of merging two sorted arrays of size n?

O(1)

O(n)

O(2n)

O(log n)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?