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
-
Little-O Notation
-
Little-Omega Notation
-
Time Complexity
-
Space Complexity
-
Effectiveness
B
Correct answer
Explanation
It is the method of expressing the loose lower bound of the running time of an algorithm.
-
Little-O Notation
-
Time Complexity
-
Big-O Notation
-
Program
-
Space Complexity
C
Correct answer
Explanation
It is the function of expressing the upper bound of the running time of an algorithm.
-
Quick Sort
-
Merge Sort
-
Decision Tree
-
Counting Sort
-
Algorithm
A
Correct answer
Explanation
Division into sublist is done through the choice and use of a pivot value, which is a value in the given list so that all values in the list less than the pivot are put in one list and rest in other list.
-
static data structure
-
complex data structure
-
global data structure
-
built-in data structure
-
both (1) and (2)
B
Correct answer
Explanation
Stack is a complex data structure as it is made by the built-in data structures.
-
Merge sort
-
Quick sort
-
Shell sort
-
Insertion sort
-
None of the above
A
Correct answer
Explanation
Merge sort is based on divide and conquer method.
-
Insertion sort
-
Quick sort
-
Heap sort
-
All of the above
-
Only (2) and (3)
E
Correct answer
Explanation
Both are the unstable sorting algorithms.
-
List
-
Singly linked list
-
Array
-
All of the above
-
None of the above
B
Correct answer
Explanation
A singly linked list implements queue data structure. In queue, addition is done at the bottom and deletion is done from the top. This is the feature of singly linked list.
-
Stack
-
Tree
-
Queue
-
Array
-
None of the above
B
Correct answer
Explanation
File system stores information in a hierarchical manner, hence it is an example of tree data structure.
-
Stack
-
Queue
-
Tree
-
Array
-
None of the above
C
Correct answer
Explanation
It is an example of tree data structure because it stores the information in hierarchical manner in the networking medium.
-
To manipulate hierarchical data
-
To make information easy to search
-
To manipulate sorted lists of data
-
All of the above
-
Only (1) and (2)
D
Correct answer
Explanation
All are the basic used of tree data structure.
-
Stack
-
Queue
-
Array
-
All of the above
-
Only (1) and (3)
C
Correct answer
Explanation
It is a built-in data structure.
-
Stack
-
Queue
-
Array
-
Linked list
-
None of the above
B
Correct answer
Explanation
Breadth-first search uses the queue data structure to search the node in the graph according to the FIFO basis,
-
Database implementation
-
Dynamic memory allocation
-
Implementing stack and queue
-
To implement hash tables
-
All of the above
E
Correct answer
Explanation
Yes, all are the applications of the array data structure.
-
To represent polynomials
-
Linked list is used in dynamic memory management and in allocation and releasing memory at runtime
-
Representing sparse matrix
-
All of the above
-
Only (1) and (3)
D
Correct answer
Explanation
All are the applications of linked list data structure.
-
Stack
-
Queue
-
Array
-
Both (1) and (3)
-
None of the above
A
Correct answer
Explanation
Decimal to binary conversion has the steps to divide the decimal number by 2 and get the binary form. This is stored in a stack. After completing this step, the binary format pops out from the stack.