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. Arrays can be used to determine control flow in programs.

  2. Arrays are also used to implement other data structures.

  3. Two-dimensional arrays are also called matrices.

  4. The element indices of arrays cannot be computed at run time.

  5. An index maps the array value to a stored object.

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

Arrays are useful mostly because the element indices can be computed at run time. Among other things, this feature allows a single iterative statement to process arbitrarily many elements of an array. For that reason, the elements of an array data structure are required to have the same size and should use the same data representation.

Multiple choice
  1. Solving the puzzle called Tower of Hanoi implements stacks.

  2. A stack is a restricted data structure.

  3. A stack may be implemented to have a bounded capacity.

  4. A stack is a specific data structure.

  5. Backtracking is an important application of stacks.

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

A stack is a particular kind of abstract data type or collection in which the principal (or only) operations on the collection are the addition of an entity to the collection, known as push and removal of an entity, known as pop.

Multiple choice
  1. Little Omega Notation

  2. Theta Notaion

  3. Recursive Algorithm

  4. Probabilistics Algorithm

  5. Greedy Algorithm

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

It is an algorithm which calls itself with smaller inputs and obtains the outputs for the current input by applying simple operaions to the returned value of the smaller input.

Multiple choice
  1. Linear Probing

  2. Quadratic Probing

  3. Extendible Hashing

  4. Buckets

  5. Linear Hashing

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

Here, the interval between probes is increased by adding the successive outputs of a polynomial to the starting value given by the original hash computation.

Multiple choice
  1. Quick Sort

  2. Radix Sort

  3. Bucket Sort

  4. Merge Sort

  5. Direct Sequencing

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

Here, we recursively chop the list into two sublists of almost equal sizes and when we get list of size one, then start sorted combining of lists the reverse order.

Multiple choice
  1. Extendible hashing

  2. Double Hashing

  3. Linear hashing

  4. Linear Probing

  5. Quadratic Probing

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

Here, the hash functions are describe as h2(key) is not equal to zero and h2 is not equal to h1 where h1 and h2 are first and second hash function.