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
A
Correct answer
Explanation
Informatica PowerCenter is an enterprise ETL tool that supports native and ODBC/OLEDB connectivity to read and write data from numerous database management systems, including Microsoft SQL Server.
-
High performance decision support environments
-
Master Data Management hubs
-
Online Transaction processing
-
All the above
A,B
Correct answer
Explanation
ETL is fundamental to data warehousing and decision support systems, making it essential for high-performance decision support environments and Master Data Management hubs. It is not designed for OLTP systems, which require real-time transaction processing rather than batch-oriented extraction, transformation, and loading.
D
Correct answer
Explanation
Vector insertions or deletions at arbitrary positions require shifting all subsequent elements to maintain contiguous storage. In the worst case, this means moving N-1 elements, resulting in O(N) time complexity.
-
Microsoft Excel
-
XML databases
-
SOAP-based Web services
-
All the above
D
Correct answer
Explanation
Xcelsius Engage can connect to multiple data sources including Microsoft Excel spreadsheets (the most common), XML databases, and SOAP-based Web services. This flexibility allows it to integrate with various enterprise systems and data formats, making it a versatile dashboard tool.
-
Binary Search
-
Sequential Search
-
Both a and b
-
None
A
Correct answer
Explanation
The correct answer is A (Binary Search). When the number of records is large and the input is already sorted, binary search is the most efficient with O(log n) time complexity. Sequential search has O(n) complexity and becomes very slow for large datasets. Binary search repeatedly divides the search interval in half, making it exponentially faster than linear search for sorted data.
-
Structure
-
Metadata
-
Article
-
XML document
B
Correct answer
Explanation
Metadata is data about data - it describes properties of content without being the content itself. Examples include author, creation date, file size, content type, etc. Structure refers to organization format, Article is content type, and XML document is a file format.
-
Content page
-
Content repository
-
Content structure
-
Content history
B
Correct answer
Explanation
WebLogic's content management system stores content in a content repository, which is the designated storage layer. Content page is where content is displayed, content structure refers to organization schema, and content history tracks versioning.
B
Correct answer
Explanation
Java arrays are statically typed - an array is declared to hold a specific type (like int[], String[]) and cannot hold mixed types. To store different types, you would need an array of Object or use a Collection.
-
Merge
-
Binary
-
Quick
-
Bubble
B
Correct answer
Explanation
Merge Sort, Quick Sort, and Bubble Sort are all sorting algorithms. Binary search is a search algorithm for finding elements in sorted arrays, not a sorting algorithm.
-
Merge Sort
-
Selection Sort
-
Bubble Sort
-
Insersion Sort
A
Correct answer
Explanation
Merge Sort has O(n log n) average and worst-case time complexity because it divides the array in half recursively (log n levels) and merges n elements at each level. Selection Sort, Bubble Sort, and Insertion Sort are all O(n^2).
-
Merge Sort
-
Bubble Sort
-
Selection Sort
-
Quick Sort
A,D
Correct answer
Explanation
Divide and conquer algorithms recursively break problems into smaller subproblems, solve them independently, and combine results. Merge Sort divides array into halves then merges. Quick Sort partitions around a pivot and recursively sorts partitions.
-
Merge Sort
-
Selection Sort
-
Bubble Sort
-
Radix Sort
D
Correct answer
Explanation
Merge Sort, Selection Sort, and Bubble Sort all compare elements to determine ordering. Radix Sort processes individual digits/buckets and doesn't compare elements directly, making it non-comparison based.
-
Quick sort partition algorithm is not in-place.
-
Radix sort is stable.
-
In merge sort, maximum complexity is involved in Merge sub-procedure.
-
In quick sort, after recursive calls to partition algorithms, merging is not needed.
-
the outermost loop
-
the innermost loop
-
all loops are executed the same number of times
-
cannot be determined without knowing the size of the loops
B
Correct answer
Explanation
In nested loops, the innermost loop executes the most times because it completes all its iterations for each iteration of every outer loop. For example, in loops with 3, 4, and 5 iterations, the innermost runs 3×4×5=60 times.
-
- Bit map indexes are used on low-cardinality columns(having low distinct values) 2.B-tree indexes are most effective for high-cardinality data(only for unique columns)
-
B-tree indexes cannot be used in environments typically have large amounts of data and ad hoc queries
-
bitmap indexes can be created on partitioned tables
-
All of the above