Fundamentals of Algorithms and Design

Fundamentals of Algorithms and Design

University

15 Qs

quiz-placeholder

Similar activities

Adjective-noun collocations

Adjective-noun collocations

10th Grade - University

10 Qs

The impossible quiz

The impossible quiz

KG - University

14 Qs

Pathways 4 Unit 5 Reading Comprehension

Pathways 4 Unit 5 Reading Comprehension

University

10 Qs

đề ktra

đề ktra

KG - Professional Development

10 Qs

DS Quiz

DS Quiz

University

12 Qs

Decoding Algorithms Quiz

Decoding Algorithms Quiz

4th Grade - University

10 Qs

Fundamentals of Algorithms and Design

Fundamentals of Algorithms and Design

Assessment

Quiz

English

University

Medium

Created by

Vignesh Rajkumar

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

What is the time complexity of a binary search algorithm?

O(n)

O(log n)

O(1)

O(n log n)

2.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Explain the difference between Big O, Big Θ, and Big Ω notations.

Big O is for lower bounds, Big Θ is for upper bounds, and Big Ω is for tight bounds.

Big O is for upper bounds, Big Θ is for tight bounds, and Big Ω is for lower bounds.

Big O is for average case, Big Θ is for worst case, and Big Ω is for best case.

Big O is for constant time, Big Θ is for linear time, and Big Ω is for exponential time.

3.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Which data structure would you use to implement a priority queue?

Linked list

Binary heap

Stack

Array

4.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Aarav is designing a recursive function to help him sort a list of books. He realizes that the function uses O(n) space to store the intermediate results. What is the space complexity of Aarav's recursive function?

O(n^2)

O(1)

O(n)

O(log n)

5.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

Describe the process of depth-first search (DFS) in graph traversal.

DFS only explores the shortest path in a graph.

DFS visits all nodes in a random order.

DFS requires a queue to keep track of nodes.

Depth-first search (DFS) explores a graph by going as deep as possible along each branch before backtracking.

6.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

What is the primary advantage of using a hash table over a binary search tree?

Faster average-case time complexity for lookups, insertions, and deletions.

Easier to implement than a binary search tree.

More efficient memory usage than a binary search tree.

Better suited for ordered data than a binary search tree.

7.

MULTIPLE CHOICE QUESTION

2 mins • 5 pts

How does the merge sort algorithm achieve its time complexity of O(n log n)?

Merge sort has a time complexity of O(n) due to its linear merging process.

Merge sort achieves O(n log n) by sorting the array in a single pass.

Merge sort achieves a time complexity of O(n log n) by recursively dividing the array and merging sorted halves.

Merge sort uses a bubble sort technique to achieve O(n 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?