
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
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
25 questions
Precios
Quiz
•
Professional Development
26 questions
INTRODUCAO A MONTAGEM DE SISTEMAS ELETRICOS
Quiz
•
Professional Development
30 questions
Código Semáforo
Quiz
•
Professional Development
25 questions
Oferta Básica + Complementaria
Quiz
•
Professional Development
30 questions
UP 2 - UNIT 3
Quiz
•
Professional Development
35 questions
Latihan Soal TIU SKD
Quiz
•
University - Professi...
25 questions
Semana da Ciência e Tecnologia - Quizz de Ciência
Quiz
•
Professional Development
25 questions
QUIZ JOB ROTATION
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade