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
  1. bubble sort

  2. polynomial manipulation

  3. binary search

  4. merge sort

  5. radix sort

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

Binary search needs sorting of arrays and the sorting using data structure link list is very complex. Hence, it is not suitable.

Multiple choice
  1. priority queues

  2. binary trees

  3. linked lists

  4. stacks

  5. All of the above

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

In heap, the most important node is stored at the top position. If it gets deleted, the second most important node replaces it. It is a similar concept as priority queue.

Multiple choice
  1. Pfam

  2. ProDom

  3. MUMmer

  4. KEGG

  5. TIGRFAMs

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

MUMmer is a bioinformatics software system for sequence alignment. It is based on the suffix tree data structure and is one of the fastest and most efficient systems available for this task, enabling it to be applied to very long sequences.

Multiple choice
  1. Queue

  2. Stack

  3. Tree

  4. Heap

  5. List

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

A stack is a particular kind of abstract data type or collection in which the principal (or only) operations on the collection are the addition of an entity to the collection, known as push and removal of an entity, known as pop. The relation between the push and pop operations is such that the stack is a Last-In-First-Out (LIFO) data structure. It is the best data for checking the balancing of parenthesis.

Multiple choice
  1. Sequential pattern

  2. Clustering / segmentation

  3. Association

  4. EIther Sequential pattern or Clustering / segmentation

  5. None of these

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

An association function is an operation against this set of records, which returns affinities or patterns that exists among the collection of items.

Multiple choice time complexity of function
  1. $\theta(n^2)$
  2. $\theta(nlogn)$
  3. $\theta(n)$
  4. $\theta(logn)^2$
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To solve this question, the user needs to know the concept of time complexity and how to analyze the time complexity of a given algorithm.

The given function fun() contains two nested loops that iterate over the range of n and j respectively. The outer loop runs n times, and the inner loop runs from i to 1. Therefore, the total number of iterations is the sum of the first n positive integers, which is n*(n+1)/2.

Since the number of iterations is proportional to n^2, the time complexity of the function is $\theta(n^2)$.

Therefore, the correct answer is:

The Answer is: A. $\theta(n^2)$