Home
Current Affairs January 2024

What is the correct answer?

4

In linear search algorithm the Worst case occurs when

A. The item is somewhere in the middle of the array

B. The item is not in the array at all

C. The item is the last element in the array

D. The item is the last element in the array or is not there at all

Correct Answer :

D. The item is the last element in the array or is not there at all


Related Questions

What is the correct answer?

4

Finding the location of the element with a given value is:

A. Traversal

B. Search

C. Sort

D. None of above

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

Given two sorted lists of size m and n respectively.The number of comparisons needed in the worst case by the merge sort algorithm will be?

A. mn

B. max(m,n)

C. min(m,n)

D. m+n-1

What is the correct answer?

4

In linear search algorithm the Worst case occurs when

A. The item is somewhere in the middle of the array

B. The item is not in the array at all

C. The item is the last element in the array

D. The item is the last element in the array or is not there at all

What is the correct answer?

4

The complexity of Binary search algorithm is

A. O(n)

B. O(log )

C. O(n2)

D. O(n log n)

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

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

A variable P is called pointer if

A. P contains the address of an element in DATA.

B. P points to the address of first element in DATA

C. P can store only memory addresses

D. P contain the DATA and the address of DATA

What is the correct answer?

4

The Average case occur in linear search algorithm

A. When Item is somewhere in the middle of the array

B. When Item is not in the array at all

C. When Item is the last element in the array

D. When Item is the last element in the array or is not there at all

What is the correct answer?

4

Two dimensional arrays are also called

A. tables arrays

B. matrix arrays

C. both of above

D. none of above

What is the correct answer?

4

Identify the data structure which allows deletions at both ends of the list but insertion at only one end.

A. Stack

B. Input restricted dequeue

C. Priority queues

D. Output restricted qequeue

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

Which of the following data structure is linear type?

A. Graph

B. Binary tree

C. Trees

D. Stack

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

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

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

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 name does not relate to stacks?

A. FIFO lists

B. LIFO list

C. Piles

D. Push-down lists

What is the correct answer?

4

The memory address of the first element of an array is called

A. floor address

B. foundation address

C. first address

D. base address

What is the correct answer?

4

_______ level is where the model becomes compatible executable code

A. Abstract level

B. Implementation level

C. Application level

D. All of the above

What is the correct answer?

4

The complexity of linear search algorithm is

A. O(n)

B. O(log n)

C. O(n2)

D. O(n log n)

What is the correct answer?

4

Which of the following data structure store the homogeneous data elements?

A. Arrays

B. Records

C. Pointers

D. None

What is the correct answer?

4

Which of the following algorithm design technique is used in the quick sort algorithm?

A. Dynamic programming

B. Greedy method

C. Divide and conquer

D. Backtracking

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

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

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

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

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

The number of possible ordered trees with three nodes A,B,C is?

A. 16

B. 12

C. 6

D. 10

What is the correct answer?

4

The term push and pop is related to the

A. array

B. lists

C. stacks

D. all of above