
Data Structures & Algorithms Quiz

Quiz
•
Other
•
Professional Development
•
Hard
Niveditha Kani
Used 1+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Given an array sorted in non-decreasing order, what’s the best time to check if a number exists?
O(n)
O(log n)
O(n log n)
O(1)
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
To remove duplicates from a sorted array in-place, which two-pointer approach is used?
Fast slower pointers
Merge sort
Hashing
Backtracking
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Time complexity to reverse a string of length n?
O(1)
O(log n)
O(n)
O(n²)
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
For checking if one string is an anagram of another (both length n), best approach?
Bubble sort + compare (O(n²))
Hash map count (O(n))
Binary search
Merge sort + compare
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What’s the time to find the longest prefix common to n strings (each of avg length m)?
O(n + m)
O(n × m)
O(log(nm))
O(n m log m)
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Removing the n-th node from the end can be done in:
O(n²)
O(n log n)
O(n) using two pointers
O(log n)
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
To detect a cycle in a linked list, which algorithm is used?
Hashmap
Sorting
Floyd’s cycle-finding
Backtracking
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Data Structures Quiz

Quiz
•
Professional Development
30 questions
2024 Simulado 05

Quiz
•
Professional Development
30 questions
2024 Simulado 8 p17

Quiz
•
Professional Development
27 questions
FORGCF5

Quiz
•
Professional Development
25 questions
PSUEDOCODE 2 CAPGEMINI

Quiz
•
Professional Development
27 questions
Quiz Random sobre perfil SLog

Quiz
•
Professional Development
30 questions
Stack and Queue

Quiz
•
Professional Development
25 questions
PSP 1 - Quiz 1 (Loving yourself and Appreciating Life)

Quiz
•
12th Grade - Professi...
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
5 questions
Setting goals for the year

Quiz
•
Professional Development
14 questions
Disney Trivia

Quiz
•
Professional Development
14 questions
2019 Logos

Quiz
•
Professional Development
7 questions
How to Email your Teacher

Quiz
•
Professional Development
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Employability Skills

Quiz
•
Professional Development