
Python Data Structures and Algorithms Quiz
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Hard
nature mind
Used 2+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
40 questions
PTS GANJIL 2023 PPKN XI
Quiz
•
Professional Development
40 questions
Quizz Compition Round 13 ( Fundamental Mix Part 5)
Quiz
•
Professional Development
44 questions
Quiz For COC 1 and COC 2
Quiz
•
Professional Development
40 questions
MS office 2016
Quiz
•
1st Grade - Professio...
40 questions
202508500004
Quiz
•
Professional Development
40 questions
AZ-900 2 de 3
Quiz
•
Professional Development
40 questions
Excel
Quiz
•
6th Grade - Professio...
40 questions
PC Maintenance Chapter 02 Part 01
Quiz
•
Professional Development
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
Disney Characters
Quiz
•
Professional Development
20 questions
Customer Service
Quiz
•
Professional Development
10 questions
Food Idioms
Quiz
•
Professional Development
20 questions
NCCER Power Tools Quiz
Quiz
•
Professional Development
