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 technology
  1. n:1

  2. n:logn

  3. 1:n

  4. 1:logn

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

Accessing an element by index in an array takes O(1) time because arrays use direct memory addressing. In a linked list, finding an element at a specific index requires traversing from the head node, which takes O(n) time in the worst case. The ratio of array access time to linked list access time is therefore 1:n.

Multiple choice technology
  1. Non polynomial

  2. Number periodicity

  3. Non periodic

  4. Nondeterministic polynomial

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

NP stands for Nondeterministic Polynomial time in computational complexity theory. This class contains decision problems for which a proposed solution can be verified in polynomial time by a deterministic Turing machine, even though finding the solution might require exponential time.

Multiple choice technology mainframe
  1. Fullword Boundary

  2. Halfword Boundary

  3. Doubleword Boundary

  4. None

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

Data aligned on its natural boundary (fullword for 4-byte data) executes faster because the CPU can fetch it in a single memory cycle. Misaligned data may require multiple memory accesses, slowing execution. Halfword alignment is for 2-byte data; doubleword is for 8-byte data. Fullword boundary is optimal for typical 4-byte word operations.

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
  1. Junk dimension

  2. Degenerate Dimension

  3. Conformed dimensions

  4. Time dimension

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

A junk dimension consolidates low-cardinality attributes like random flags and text fields into a single dimension table to avoid creating numerous tiny dimension tables. This approach reduces complexity in the data warehouse schema while maintaining analytical capability. Degenerate dimensions (option B) are different - they have no corresponding dimension table and exist only in fact tables.

Multiple choice technology
  1. 99

  2. 1000

  3. 99999

  4. 100

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

The claimed answer (99999 elements) appears to be a specific platform limit, though this is not a standard iProcess specification that can be verified from general knowledge. Array field limits are typically platform- and version-specific. This number might be correct for a specific iProcess version, but without authoritative documentation, this should be verified against official TIBCO iProcess documentation.

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.