Home
Current Affairs January 2024

What is the correct answer?

4

The complexity of Bubble sort algorithm is

A. O(n)

B. O(log n)

C. O(n2)

D. O(n log n)

Correct Answer :

B. O(log n)


Related Questions

What is the correct answer?

4

A binary search tree whose left subtree and right subtree differ in hight by at most 1 unit is called ……

A. AVL tree

B. Red-black tree

C. Lemma tree

D. None of the above

What is the correct answer?

4

Stack is also called as

A. Last in first out

B. First in last out

C. Last in last out

D. First in first out

What is the correct answer?

4

If the values of a variable in one module is indirectly changed by another module, this situation is called

A. internal change

B. inter-module change

C. side effect

D. side-module update

What is the correct answer?

4

Which of the following is true about the characteristics of abstract data types?
i) It exports a type.
ii) It exports a set of operations

A. True, False

B. False, True

C. True, True

D. False, False

What is the correct answer?

4

Which data structure is used in breadth first search of a graph to hold nodes?

A. Array

B. Stack

C. Tree

D. queue

What is the correct answer?

4

Which of the following is not the required condition for binary search algorithm?

A. The list must be sorted

B. there should be the direct access to the middle element in any sublist

C. There must be mechanism to delete and/or insert elements in list

D. none of above

What is the correct answer?

4

Which of the following data structures are indexed structures?

A. linear arrays

B. linked lists

C. both of above

D. none of above

What is the correct answer?

4

The operation of processing each element in the list is known as

A. Sorting

B. Merging

C. Inserting

D. Traversal

What is the correct answer?

4

Which of the following is not a limitation of binary search algorithm?

A. must use a sorted array

B. requirement of sorted array is expensive when a lot of insertion and deletions are needed

C. there must be a mechanism to access middle element directly

D. binary search algorithm is not efficient when the data elements are more than 1000.

What is the correct answer?

4

Linked list are not suitable data structure of which one of the following problems ?

A. Binary search

B. Insertion sort

C. Radix sort

D. Polynomial manipulation

What is the correct answer?

4

The initial configuration of the queue is a,b,c,d (a is the front end). To get the configuration d,c,b,a one needs a minimum of ?

A. 3 additions and 2 deletions

B. 2 deletions and 3 additions

C. 3 deletions and 4 additions

D. 3 deletions and 3 additions

What is the correct answer?

4

Which data structure allows deleting data elements from and inserting at rear?

A. Stacks

B. Dequeues

C. Queues

D. Binary search tree

What is the correct answer?

4

When determining the efficiency of algorithm, the space factor is measured by

A. Counting the maximum memory needed by the algorithm

B. Counting the minimum memory needed by the algorithm

C. Counting the average memory needed by the algorithm

D. Counting the maximum disk space needed by the algorithm

What is the correct answer?

4

The complexity of Bubble sort algorithm is

A. O(n)

B. O(log n)

C. O(n2)

D. O(n log n)

What is the correct answer?

4

______ is very useful in situation when data have to stored and then retrieved in reverse order.

A. Stack

B. Queue

C. List

D. Link list

What is the correct answer?

4

Which of the following data structure is not linear data structure?

A. Arrays

B. Linked lists

C. Both of above

D. None of above

What is the correct answer?

4

Which of the following case does not exist in complexity theory

A. Best case

B. Null case

C. Worst case

D. Average case

What is the correct answer?

4

The number of swapping needed to sort numbers 8,22,7,9,31,19,5,13 in ascending order using bubble sort is ?

A. 11

B. 12

C. 13

D. 14

What is the correct answer?

4

Which of the following is non-liner data structure?

A. List

B. Stacks

C. Trees

D. Strings

What is the correct answer?

4

Each data item in a record may be a group item composed of sub-items; those items which are indecomposable are called

A. elementary items

B. atoms

C. scalars

D. all of above

What is the correct answer?

4

For an algorithm the complexity of the average case is

A. Much more complicated to analyze than that of worst case

B. Much more simpler to analyze than that of worst case

C. Sometimes more complicated and some other times simpler than that of worst case

D. None or above

What is the correct answer?

4

Merge sort uses ?

A. Divide and conquer strategy

B. Backtracking approach

C. Heuristic search

D. Greedy approach

What is the correct answer?

4

The difference between linear array and a record is

A. An array is suitable for homogeneous data but the data items in a record may have different data type

B. In a record, there may not be a natural ordering in opposed to linear array.

C. A record form a hierarchical structure but a linear array does not

D. All of above

What is the correct answer?

4

A ______ is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out.

A. Stacks linked list

B. Queue linked list

C. Both of them

D. Neither of them

What is the correct answer?

4

Binary search algorithm can not be applied to

A. sorted linked list

B. sorted binary trees

C. sorted linear array

D. pointer array

What is the correct answer?

4

To represent hierarchical relationship between elements, Which data structure is suitable?

A. Tree

B. Graph

C. Priority

D. Dequeue

What is the correct answer?

4

The situation when in a linked list START=NULL is

A. underflow

B. overflow

C. housefull

D. saturated

What is the correct answer?

4

Two main measures for the efficiency of an algorithm are

A. Processor and memory

B. Complexity and capacity

C. Time and space

D. Data and space

What is the correct answer?

4

Which of the following statement is false?

A. Arrays are dense lists and static data structure

B. data elements in linked list need not be stored in adjacent space in memory

C. pointers store the next data element of a list

D. linked lists are collection of the nodes that contain information part and next pointer

What is the correct answer?

4

Arrays are best data structures

A. for relatively permanent collections of data

B. for the size of the structure and the data in the structure are constantly changing

C. for both of above situation

D. for none of above situation