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 web technology
  1. Filters

  2. Sort

  3. Rank

  4. Data aggregation

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

To find the top N or bottom N items, you must sort the data first. Ranking assigns position numbers, and filters can then select based on those ranks, but the fundamental operation is sorting to establish order.

Multiple choice technology web technology
  1. Filters

  2. Sort

  3. Rank

  4. Data aggregation

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

Top n and Bottom n queries are achieved using Sort operations, which order data based on specified criteria and then allow selecting the highest or lowest values. Filters restrict data based on conditions, Rank assigns position numbers, and Data aggregation combines values - none directly produce ordered Top/Bottom selections.

Multiple choice technology web technology
  1. Filters

  2. Sort

  3. Rank

  4. Data aggregation

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

To achieve Top n or Bottom n results, you need to Sort the data first to establish ordering, then select the first or last n records. Filters reduce rows but don't guarantee ordering, Rank assigns position numbers but doesn't subset data, and Data aggregation summarizes rather than selects extremes.

Multiple choice technology platforms and products
  1. Entire

  2. Round Robin

  3. Random

  4. Hash

  5. Modulus

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

Keyless partitioning methods distribute data without using a specific key column: Entire places all rows in one partition, Round Robin distributes rows sequentially across partitions, and Random assigns rows randomly. Hash and Modulus require key columns to calculate partition assignments.

Multiple choice technology programming languages
  1. True

  2. False

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

Array operations are faster than Vector because arrays are fixed-size, lightweight data structures with no synchronization overhead. Vector is a synchronized, thread-safe legacy class that acquires locks for every operation, making it slower even in single-threaded contexts.

Multiple choice technology web technology
  1. Using lookup() function

  2. Using Generate Records component

  3. Using re_index() function

  4. Using next_in_sequence() function

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

The next_in_sequence() function generates unique sequential numbers, which is the standard way to create surrogate keys in Ab Initio for maintaining unique identifiers across records.

Multiple choice technology web technology
  1. Inner Join

  2. Explicit Join ( record-required 0 = true, record-required 1 = true )

  3. Explicit Join ( record-required 0 = false, record-required 1 = true )

  4. Explicit Join ( record-required 0 = true, record-required 1 = false )

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

Setting record-required 0 to false allows unmatched records from In0 to pass through (like a left outer join), while record-required 1 = true requires matches from In1. This gives all matching records plus unmatched In0 records.

Multiple choice technology web technology
  1. Pipeline parallelism

  2. Costly in terms of space and time

  3. Removes duplicates on the key specified

  4. None of the above

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

Sort components are resource-intensive because they must collect all records before sorting, often require disk spillover for large datasets, and perform expensive comparison operations across the entire dataset.

Multiple choice technology programming languages
  1. proc printto allows to redirect the output

  2. no difference

  3. proc printto is faster and takes less memory space

  4. proc printto does not exists

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

In SAS, PROC PRINT writes data to the default output destination, whereas PROC PRINTTO is used to redirect SAS log or procedure output to an external file or alternative destination.

Multiple choice technology programming languages
  1. p is a pointer to a 10 element integer array

  2. p is a 10-element array of pointers to integer quantity

  3. p is a pointer to an integer quantity

  4. None of the above

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

In int *p[10], the array operator [ ] has higher precedence than *. This means p is an array of 10 elements, where each element is a pointer to an integer. int (*p)[10] would be a pointer to an array.

Multiple choice technology programming languages
  1. p is a pointer to a 10 element integer array

  2. p is a pointer to an integer quantity

  3. p is a 10-element array of pointers to an integer

  4. None of the above

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

The parentheses override default operator precedence. Because *p is grouped together, p is declared as a pointer. It points to an array of 10 integers. Without parentheses, int *p[10] would be an array of 10 pointers.

Multiple choice technology platforms and products
  1. Similar Data

  2. Isolated data

  3. Unique data

  4. None of Above

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

In data warehousing, a 'stovepipe' refers to isolated data marts that are developed independently without conforming to enterprise standards. These stovepipe systems cannot easily share or integrate data with other parts of the organization, creating information silos. The term comes from the analogy of separate stove pipes that don't connect.

Multiple choice technology platforms and products
  1. Clean Data

  2. Dirty Data

  3. Clean and Dirty Data

  4. None of above

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

A core purpose of data warehousing is the ETL (Extract, Transform, Load) process that cleanses source data by removing errors, handling missing values, standardizing formats, and applying business rules. The data warehouse stores this cleaned, consistent, integrated data - this is a fundamental differentiator from operational systems that may contain dirty, inconsistent data.