
Python Data Structures and Algorithms Quiz
Authored by nature mind
Computers
Professional Development
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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)
Access all questions and much more by creating a free account
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
39 questions
Lvl 1 Introduction DBMS (QB)
Quiz
•
Professional Development
39 questions
Ôn tập Học Kỳ 2 Mạng máy tính- Khối 10
Quiz
•
Professional Development
40 questions
Computer Networking Midterm
Quiz
•
Professional Development
39 questions
Final 420-908-LA
Quiz
•
Professional Development
44 questions
Networking, Load Balancing, Storage and Configuration
Quiz
•
Professional Development
40 questions
CYBER SECURITY
Quiz
•
Professional Development
41 questions
TIN HỌC 11 HKII
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...