Data Structures and Algorithms Quiz

Data Structures and Algorithms Quiz

University

50 Qs

quiz-placeholder

Similar activities

UH 1 Berpikir Komputasional

UH 1 Berpikir Komputasional

10th Grade - University

50 Qs

Digital Devices

Digital Devices

5th Grade - University

50 Qs

ICT 151-200

ICT 151-200

University

50 Qs

Design and Analysis of Algorithms [5th Sem BCA]

Design and Analysis of Algorithms [5th Sem BCA]

University

45 Qs

ITC 112 - Topic 1 Quiz

ITC 112 - Topic 1 Quiz

University

55 Qs

UAS AI

UAS AI

University

55 Qs

CPSC 200 EXAM

CPSC 200 EXAM

University

50 Qs

Computer Programming Function

Computer Programming Function

7th Grade - University

55 Qs

Data Structures and Algorithms Quiz

Data Structures and Algorithms Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Anisha SET

Used 2+ times

FREE Resource

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of finding the median in two sorted arrays of sizes m and n using the optimal binary search approach?

O(m+n)

O(log(min(m,n)))

O(log(max(m,n)))

O(1)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data structure is best suited for implementing Dijkstra's Algorithm efficiently?

Stack

Queue

Priority Queue (Min-Heap)

Linked List

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst-case time complexity of QuickSort?

O(n log n)

O(n²)

O(log n)

O(n)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the Knuth-Morris-Pratt (KMP) string matching algorithm, the LPS array stores:

Longest prefix which is also suffix

Longest palindrome substring

Number of mismatches

Hash value of substring

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following problems cannot be solved using Dynamic Programming?

Longest Common Subsequence

N-Queens Problem

Matrix Chain Multiplication

Coin Change Problem

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the space complexity of DFS in a graph using adjacency list (excluding recursion stack)?

O(V)

O(V+E)

O(E)

O(V*E)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which traversal method can be used to check if a binary tree is a BST?

Preorder

Inorder

Postorder

Level Order

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?