DSA Quiz - 50 Questions

DSA Quiz - 50 Questions

Professional Development

50 Qs

quiz-placeholder

Similar activities

python

python

5th Grade - Professional Development

50 Qs

ES036 Midterm Exam

ES036 Midterm Exam

Professional Development

50 Qs

DSA Quiz - 50 Questions

DSA Quiz - 50 Questions

Assessment

Quiz

Science

Professional Development

Hard

Created by

KARTHIK NAMA

Used 4+ times

FREE Resource

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of accessing an element in an array using its index?

O(n)

O(log n)

O(1)

O(n log n)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following algorithms is best for finding the second largest element in an unsorted array?

Single traversal

Bubble Sort

Binary Search

Merge Sort

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In string problems, which algorithm is used for pattern matching?

Kruskal's Algorithm

Rabin-Karp

Dijkstra's Algorithm

Prim's Algorithm

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If an array is rotated k times, what is the best way to find the minimum element?

Linear search

Binary search

Hashing

Merge sort

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you try to access an index that is out of bounds in an array?

Prints 5

IndexError

Prints None

Runtime Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is not true about linked lists compared to arrays?

Easier insertion/deletion

Faster random access

Memory can be dynamic

Can grow/shrink easily

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which pointer makes a doubly linked list possible?

Next pointer only

Previous pointer only

Both next & previous

None

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?

Discover more resources for Science