Computer Knowledge

Data Structures and Algorithms

1,518 Questions

Data Structures and Algorithms form the core of computer science, focusing on arrays, linked lists, trees, and sorting mechanisms. These concepts are essential for solving complex computational problems efficiently. Test takers preparing for technical and administrative IT exams will find these questions highly relevant.

Array OperationsLinked List ApplicationsSorting AlgorithmsTree Data StructuresMultilevel IndexingAlgorithm Time Complexity

Data Structures and Algorithms Questions

Multiple choice
  1. Rear =1, Front = 1

  2. Rear = 1, Front = 7

  3. Rear = 1, Front = 2

  4. Queue overflows

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Initial: Rear=2, Front=6. Size is 3 (A, B, C). Insert(X), Insert(Y): Rear=4. Remove(): Front=7. Insert(Z), Insert(D), Insert(E): Rear=7. The queue is full.

Multiple choice
  1. to avoid overflow

  2. an index entry is not created for every value

  3. the entry contains the search key and a pointer in the first data record with that search key value

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In this, index entry is not created for every value. Each index entry contains a search-key and a pointer to the first record with that search-key value.

Multiple choice
  1. a list of keys

  2. pointers to the master list

  3. both (1) and (2)

  4. none of above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

An index is a data structure that improves the speed of data retrieval. It contains a list of keys and pointers to the actual records in the master list.

Multiple choice
  1. last in first out order

  2. first in first out order

  3. parallel fashion

  4. any one of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Recursive functions rely on the call stack to manage function invocations. Since the stack follows a last in first out (LIFO) structure, the most recently called function must complete before returning to the previous caller.

Multiple choice
  1. Double

  2. Union

  3. Function

  4. Array

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In C, scalar data types include basic types like int, char, float, and double. Arrays, unions, and functions are derived or aggregate types.