0%

What is the primary purpose of an algorithm?

Correct! Wrong!

An algorithm is a step-by-step procedure used for calculations, data processing, and automated reasoning tasks.

Which data structure is most suitable for implementing a LIFO (Last In, First Out) principle?

Correct! Wrong!

LIFO means the last element inserted is the first one to be removed.

What is a binary search algorithm?

Correct! Wrong!

A binary search algorithm is a method of finding an element in a sorted array or list by repeatedly dividing the search interval in half.

What is the time complexity of an algorithm that performs a linear search in an unsorted array?

Correct! Wrong!

Linear search checks each element in sequence to find the target value.

Which of the following is a non-linear data structure?

Correct! Wrong!

Non-linear data structures allow elements to be connected in a hierarchical or graph-based way.

What is the space complexity of a recursive algorithm?

Correct! Wrong!

Recursive algorithms use additional space for each recursive call, usually in the form of a stack frame.

Loading Questions...

Which of the following is an example of a divide-and-conquer algorithm?

Correct! Wrong!

Divide-and-conquer algorithms break the problem into smaller sub-problems and solve each one recursively.

What is the primary use case of a hash table?

Correct! Wrong!

Hash tables provide efficient data retrieval based on keys using a hashing function.

What does O(log n) time complexity represent?

Correct! Wrong!

Algorithms with O(log n) time complexity reduce the problem size exponentially at each step, like in binary search.