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. Character, file, record, field, database

  2. Character, record, field, database, file

  3. Character, field, record, file, database

  4. Bit, byte, character, record, field, file, database,

  5. None of these

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

Data hierarchy proceeds from smallest to largest: a character is the smallest unit, characters form a field (single data item), fields combine to make a record (complete set of related fields), records are stored in files, and files organize into databases. This is the fundamental organization structure in database systems.

Multiple choice
  1. Queue

  2. Stack

  3. Tree

  4. Heap

  5. List

Reveal answer Fill a bubble to check yourself
B 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. The relation between the push and pop operations is such that the stack is a Last-In-First-Out (LIFO) data structure. It is the best data for checking the balancing of parenthesis.

Multiple choice
  1. Only (1)

  2. Only (2)

  3. Only (3)

  4. Both (1) & (2)

  5. Both (2) & (3)

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

According to the rules of an array, element number is used for calling each element and all elements share the same name. Therefore, statements (1) and (2) are true. We can also modify each element separately. So, statement (3) is incorrect. Hence, option (4) is correct.

Multiple choice
  1. 1968

  2. 1976

  3. 1992

  4. 1972

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

The data type “long double” needs 10 bytes to store an element, and array elements are stored in sequential memory address. If 5th element address is 2008, then 1st element will be at address 2008-10-10-10-10 Or 2008 - 40 = 1968. Hence, option (1) is correct.