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
C
Correct answer
Explanation
Reversing a linked list requires traversing the list once and redirecting each node's next pointer to its predecessor. This is done in a single pass with constant work per node, giving O(n) time complexity.
-
O(n^3) Brute Force
-
O(2^n) Recursion
-
O(n^2) DP
-
O(n) Divide & Conquer
B,C
Correct answer
Explanation
This minimum path sum problem can be solved by recursion (exponential O(2^n) by exploring all paths) or optimally by dynamic programming (O(n^2) using memoization). Brute force would be O(n^3) or worse, and divide & conquer doesn't apply to this DP structure.
-
O(2^n) Recursion
-
O(n^3) Brute Force
-
O(n) Divide & Conquer
-
O(n^2) DP
A,D
Correct answer
Explanation
This is the same minimum path sum problem - recursion explores all possible paths giving O(2^n) complexity, while dynamic programming with memoization achieves O(n^2) by avoiding recomputation. Divide & conquer is not applicable to this DP-optimized structure.
-
Incoming Data
-
Golden copy data
-
intermediate data
-
Non-conformant data
D
Correct answer
Explanation
Suspect Items in data quality contexts refer to data that fails validation rules or doesn't conform to expected standards - hence 'Non-conformant data'. This distinguishes them from valid incoming data, golden copies (validated reference data), or intermediate processing data.
-
2 observations
-
0 observations
-
1 observation
-
Error
B
Correct answer
Explanation
Dataset A has 2 observations (x=1,y=3,z=6 and x=2,y=4,z is not set). When reading into B, we compute z=x*y. For first obs: 1*3=3, but WHERE z<6 filters it out. For second obs: 2*4=8, also filtered out. Result: 0 observations meet the WHERE condition.
-
Observations = 2 and Gender = .
-
Observations = 2 and Gender = 0
-
Observations = 3 and Gender = 0
-
Observations = 3 and Gender = .
-
Give the MANDT field as a first field
-
Select the primary key as defined in your db tables.
-
Give initial values
-
None of the above
D
Correct answer
Explanation
When defining a structure in SE11 (SAP's data dictionary), you don't need to include MANDT (client field) as the first field (it's automatic in tables), you don't define primary keys in structures (that's for tables), and initial values aren't required. Therefore none of A, B, or C are mandatory rules.
-
In the itab you can store more than one same BP number
-
The internal table also treats the primary key in the same way.
-
All the above
-
None of the above
A
Correct answer
Explanation
In ABAP, a standard internal table declared as 'type table of' does NOT enforce primary key uniqueness by default. Unlike database tables where primary keys must be unique, standard internal tables allow duplicate entries. You can indeed store multiple records with the same BP number in such an internal table. Option B is incorrect because internal tables do not enforce primary key constraints the same way database tables do.
-
LT & GT
-
GT & LT
-
GE & LE
-
LE & GE
D
Correct answer
Explanation
SELECT-OPTIONS in ABAP define a range table with LOW and HIGH values. The default operators that work with select options are LE (Less than or Equal) for the LOW value and GE (Greater than or Equal) for the HIGH value. This creates an inclusive range. Options A, B, and C show different operator combinations that are not the standard default for SELECT-OPTIONS. The LE & GE combination (option D) is the correct pairing.
-
For telling the record is Included
-
For telling the record is updated
-
For telling the value is positive
-
For telling the value is negative
A
Correct answer
Explanation
In ABAP SELECT-OPTIONS, the SIGN field determines whether the selection criteria range should include or exclude records. The value 'I' stands for inclusive, signifying that matching records are included, whereas the other options regarding updates, positive, or negative values are incorrect.
-
Used for Internal table declaration
-
Used for Select-options declaration
-
Used for Select-options without Selection screen
-
Used for parameters without input screen
C
Correct answer
Explanation
The RANGES keyword in SAP ABAP declares a selection table (similar to SELECT-OPTIONS) without creating an input field on the selection screen. This is useful when you need to work with ranges of values programmatically rather than accepting user input. Option A is incorrect because RANGES is not for internal tables. Option B describes SELECT-OPTIONS, which does create a selection screen. Option D refers to PARAMETERS, not RANGES.
A
Correct answer
Explanation
Yes, Java transformation is a valid transformation type in Informatica PowerCenter. It allows developers to write custom transformation logic using Java code, providing flexibility for complex data transformations that might be difficult to achieve using built-in transformations. The Java transformation can include imports, use Java libraries, and implement custom business logic.
A
Correct answer
Explanation
When a COBOL program performs sorting operations (via SORT verb), it typically invokes external sort utilities provided by the operating system or runtime environment rather than implementing the sort algorithm internally. This external sorting leverages optimized system utilities for efficient data processing, making the statement True.
-
Sort data records
-
Ignore fields, calculate data
-
Load data from a SQL data source, change signs on data
-
All of the above
C
Correct answer
Explanation
Essbase data load rules files enable loading data from SQL sources and allow data manipulation like changing signs. Options A and B mention capabilities that are either not the primary purpose or incorrectly stated. Option D 'All of the above' is incorrect because not all listed functions are valid. SQL-based loading and sign changes are core rules file capabilities.
-
Integration Service
-
Repository Service
-
Metadata Services
-
Application Services
A
Correct answer
Explanation
In Informatica PowerCenter, Integration Service is the runtime engine that moves data from source to target systems. Repository Service manages metadata, Application Services handle application-specific tasks, and Metadata Services provide metadata access.