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 technology architecture
  1. Arrays are dense lists and static data structure

  2. data elements in linked list need not be stored in adjecent space in memory

  3. pointers store the next data element of a list

  4. linked lists are collection of the nodes that contain information part and next pointer

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

Option C is false because pointers store the ADDRESS of the next node, not the data element itself. Options A, B, and D are true: arrays are dense static structures, linked list elements need not be adjacent in memory (linked by pointers), and linked lists are collections of nodes with data and pointer fields.

Multiple choice technology architecture
  1. sorted linked list

  2. sorted binary trees

  3. sorted linear array

  4. pointer array

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

Binary search requires O(1) direct access to the middle element, which is not possible in linked lists as they require sequential traversal. Binary search CAN be applied to sorted linear arrays (direct index access), sorted binary trees (balanced BSTs allow O(log n) access), and pointer arrays (also support direct access).

Multiple choice technology architecture
  1. underflow

  2. overflow

  3. housefull

  4. saturated

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

Overflow occurs when trying to insert data into a data structure that has no remaining space. Underflow is the opposite - attempting to remove from an empty structure. 'Housefull' and 'saturated' are not standard computer science terminology for this condition.

Multiple choice technology architecture
  1. FIFO lists

  2. LIFO list

  3. Piles

  4. Push-down lists

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

Stacks operate on LIFO (Last In First Out) principle, meaning the last element added is the first one removed. FIFO (First In First Out) is the characteristic of queues, not stacks. LIFO, piles, and push-down lists are all names associated with stack data structures, while FIFO specifically describes queue behavior.

Multiple choice technology architecture
  1. array

  2. lists

  3. stacks

  4. all of above

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

Push and pop are the fundamental operations of stack data structures. Push adds an element to the top of the stack, while pop removes the top element. While stacks can be implemented using arrays or linked lists, the terms push and pop specifically refer to stack operations and are standard terminology for this abstract data type.

Multiple choice technology
  1. Partition by key

  2. join

  3. Gather

  4. reformat

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

Gather is a de-partitioning component that collects data from multiple partitions and consolidates it into a single partition. This is the opposite of partitioning operations (like Partition by Key) that split data across partitions, making it the correct answer.

Multiple choice technology
  1. Partition by key

  2. join

  3. Gather

  4. reformat

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

Gather is a de-partitioning component because it collects data from multiple partitioned flows and reunites them into a single flow. The opposite operation is partitioning (by key, round robin, etc.). Components like Partition by key and Join are partitioning operations, not de-partitioning.

Multiple choice technology
  1. Round Robin

  2. Same

  3. Hash

  4. Modulus

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

Keyless partitioning methods distribute or maintain data flow without requiring a key column value. Round Robin rotates rows sequentially across partitions without reading any field. Same partitioning preserves the existing partitioning from the previous stage without applying any key-based logic. In contrast, Hash and Modulus both require a key column to calculate partition assignments.

Multiple choice technology
  1. True

  2. False

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

Transformer Stage Variables are strictly local to the Transformer stage where they're defined. They cannot be referenced or accessed outside that specific stage, unlike some other DataStage constructs. This scope limitation is by design to maintain encapsulation within the stage logic.

Multiple choice technology
  1. True

  2. False

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

Mapplets can be nested within other mapplets in Informatica. This allows building reusable transformation components that themselves contain other mapplets, creating modular hierarchical designs.

Multiple choice technology
  1. Analysis of Framework Manager

  2. Filtering run time macros

  3. Analysis of multi-dimensional model

  4. Analysis of relational model

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

Cognos Analysis Studio is designed for analyzing multi-dimensional data models (OLAP cubes), allowing users to explore data across multiple dimensions like time, geography, and product categories. It is not used for Framework Manager analysis (A), runtime macro filtering (B), or analyzing purely relational models (D). The tool specializes in OLAP and business intelligence analysis.

Multiple choice technology programming languages
  1. Vector

  2. Array List

  3. Linked List

  4. None of the above

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

LinkedList is theoretically the fastest for inserting into the middle of a list because it only requires updating the pointers of neighboring nodes, which is an O(1) operation once located. Array-based structures like ArrayList and Vector require shifting all subsequent elements, which is an O(N) operation and significantly slower.

Multiple choice technology
  1. Repository Server

  2. Repository Database

  3. Repository Manager

  4. 1 & 2

  5. None

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

Power Center Server consists of the Repository Server and Repository Database. The Repository Server manages connections and metadata storage, while the Repository Database stores all metadata objects. Repository Manager is a client tool for accessing the repository, not a server component.