Computer Knowledge

Data Structures and Algorithms

1,256 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. 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.

Multiple choice
  1. Two-dimensional array

  2. One- dimenstrional array

  3. Multi dimensional array

  4. Single ten array

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

One-dimensional arrays require only one index to access an element (like arr[5]). Two-dimensional arrays need two indices (arr[3][2]), and multidimensional arrays need even more. The term 'One-dimenstrional' has a typo but is clearly intended.

Multiple choice
  1. substitution

  2. recursion

  3. non-recursion

  4. none of the above

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

Depth-First Search (DFS) is a classic algorithm that traverses tree or graph structures by going as deep as possible before backtracking, which is naturally implemented using recursion.

Multiple choice
  1. DFS algorithm

  2. BFS algorithm

  3. Best-First Search algorithm

  4. Problem reduction

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

A* is a classic informed search algorithm that uses a heuristic function to guide a Best-First Search, balancing the cost from the start and the estimated cost to the goal.

Multiple choice
  1. DFS algorithm

  2. Problem reduction

  3. Best-First Search algorithm

  4. None of these

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

The AO* algorithm is designed to search AND-OR graphs, which are used for problem reduction, where a complex problem is broken down into smaller, simpler subproblems.