Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

What Are The Disadvantages Of Representing A Stack Or Queue By A Linked List?

Answer»

i) A node in a linked list (info and next field) OCCUPIES more storage than a corresponding ELEMENT in an array.
II) Additional time spent in managing the AVAILABLE list.

i) A node in a linked list (info and next field) occupies more storage than a corresponding element in an array.
ii) Additional time spent in managing the available list.

2.

What Are The Disadvantages Of Sequential Storage?

Answer»

i) FIXED amount of STORAGE remains ALLOCATED to the data structure even if it contains LESS element.
ii) No more than fixed amount of storage is allocated causing overflow.

i) Fixed amount of storage remains allocated to the data structure even if it contains less element.
ii) No more than fixed amount of storage is allocated causing overflow.

3.

What Is A Priority Queue?

Answer»

The PRIORITY queue is a data structure in which the intrinsic ORDERING of the elements (numeric or alphabetic)

Determines the RESULT of its basic operation. It is of two TYPES:

i) Ascending priority queue- Here smallest item can be removed (insertion is ARBITRARY).
ii) Descending priority queue- Here largest item can be removed (insertion is arbitrary).

The priority queue is a data structure in which the intrinsic ordering of the elements (numeric or alphabetic)

Determines the result of its basic operation. It is of two types:

i) Ascending priority queue- Here smallest item can be removed (insertion is arbitrary).
ii) Descending priority queue- Here largest item can be removed (insertion is arbitrary).

4.

What Are The Disadvantages Array Implementations Of Linked List?

Answer»

i) The no of nodes needed can’t be predicted when the program is WRITTEN.
II) The no of nodes DECLARED must remain ALLOCATED throughout its execution.

i) The no of nodes needed can’t be predicted when the program is written.
ii) The no of nodes declared must remain allocated throughout its execution.

5.

What Do You Mean By Overflow And Underflow?

Answer»

When new DATA is to be inserted into the data STRUCTURE but there is no available SPACE i.e. free storage list is empty this situation is CALLED overflow.

When we want to delete data from a data structure that is empty this situation is called UNDERFLOW.

When new data is to be inserted into the data structure but there is no available space i.e. free storage list is empty this situation is called overflow.

When we want to delete data from a data structure that is empty this situation is called underflow.

6.

What Do You Mean By Garbage Collection?

Answer»

It is a technique in which the OPERATING system periodically collects all the deleted space ONTO the free storage list.

It takes place when there is MINIMUM amount of space left in storage list or when CPU is IDEAL.

The alternate method to this is to immediately reinsert the space into free storage list which is TIME consuming.

It is a technique in which the operating system periodically collects all the deleted space onto the free storage list.

It takes place when there is minimum amount of space left in storage list or when CPU is ideal.

The alternate method to this is to immediately reinsert the space into free storage list which is time consuming.

7.

What Do You Mean By Free Pool?

Answer»

Pool is a LIST consisting of unused MEMORY CELLS which has its own POINTER.

Pool is a list consisting of unused memory cells which has its own pointer.

8.

We Apply Binary Search Algorithm To A Sorted Linked List, Why?

Answer»

No we cannot apply binary search algorithm to a sorted LINKED LIST, SINCE there is no way of indexing the middle ELEMENT in the list. This is the drawback in using linked list as a data structure.

No we cannot apply binary search algorithm to a sorted linked list, since there is no way of indexing the middle element in the list. This is the drawback in using linked list as a data structure.

9.

What Are The Advantages Of Linked List Over Array (static Data Structure)?

Answer»

The disadvantages of array are:

i) unlike linked LIST it is expensive to INSERT and delete elements in the array.
ii) One can’t double or triple the size of array as it occupies block of memory SPACE.

In linked list

i) each element in list contains a FIELD, called a link or pointer which contains the ADDRESS of the next element.
ii) Successive element’s need not occupy adjacent space in memory.

The disadvantages of array are:

i) unlike linked list it is expensive to insert and delete elements in the array.
ii) One can’t double or triple the size of array as it occupies block of memory space.

In linked list

i) each element in list contains a field, called a link or pointer which contains the address of the next element.
ii) Successive element’s need not occupy adjacent space in memory.

10.

What Actions Are Performed When A Function Returns?

Answer»

i) RETURN address is RETRIEVED.
II) Function’s data area is freed.
iii) BRANCH is taken to the return address.

i) Return address is retrieved.
ii) Function’s data area is freed.
iii) Branch is taken to the return address.

11.

What Actions Are Performed When A Function Is Called?

Answer»

When a function is called

i) arguments are PASSED.
II) local VARIABLES are allocated and initialized.
ii) TRANSFERRING CONTROL to the function.

When a function is called

i) arguments are passed.
ii) local variables are allocated and initialized.
ii) transferring control to the function.

12.

What Is Sequential Search?

Answer»

In sequential SEARCH each item in the ARRAY is compared with the item being searched until a match occurs. It is APPLICABLE to a table organized EITHER as an array or as a linked LIST.

In sequential search each item in the array is compared with the item being searched until a match occurs. It is applicable to a table organized either as an array or as a linked list.

13.

What Do You Mean By Recursive Definition?

Answer»

The DEFINITION which defines an object in TERMS of SIMPLER cases of itself is called recursive definition.

The definition which defines an object in terms of simpler cases of itself is called recursive definition.

14.

What Is The Difference Between A Stack And An Array?

Answer»

STACK:

i) Stack is a ordered collection of items.
ii) Stack is a dynamic object WHOSE size is constantly changing as items are PUSHED and popped.
iii) Stack may contain different data types.
IV) Stack is declared as a structure containing an ARRAY to hold the element of the stack, and an INTEGER to indicate the current stack top within the array.

ARRAY:

i) Array is an ordered collection of items.
ii) Array is a static object i.e. no of item is fixed and is assigned by the declaration of the array.
iii) It contains same data types.
iv) Array can be home of a stack i.e. array can be declared large enough for maximum size of the stack.

STACK:

i) Stack is a ordered collection of items.
ii) Stack is a dynamic object whose size is constantly changing as items are pushed and popped.
iii) Stack may contain different data types.
iv) Stack is declared as a structure containing an array to hold the element of the stack, and an integer to indicate the current stack top within the array.

ARRAY:

i) Array is an ordered collection of items.
ii) Array is a static object i.e. no of item is fixed and is assigned by the declaration of the array.
iii) It contains same data types.
iv) Array can be home of a stack i.e. array can be declared large enough for maximum size of the stack.

15.

What Does Abstract Data Type Mean?

Answer»

Data type is a COLLECTION of values and a set of OPERATIONS on these values. Abstract data type refer to the mathematical concept that define the data type.

It is a useful tool for specifying the logical PROPERTIES of a data type.

ADT consists of two parts

1) Values definition
2) Operation definition

Example:-The value definition for the ADT RATIONAL states that RATIONAL value consists of two integers, second doesn’t equal to ZERO.

The operator definition for ADT RATIONAL includes the operation of creation (make rational) addition, multiplication and test for equality.

Data type is a collection of values and a set of operations on these values. Abstract data type refer to the mathematical concept that define the data type.

It is a useful tool for specifying the logical properties of a data type.

ADT consists of two parts

1) Values definition
2) Operation definition

Example:-The value definition for the ADT RATIONAL states that RATIONAL value consists of two integers, second doesn’t equal to zero.

The operator definition for ADT RATIONAL includes the operation of creation (make rational) addition, multiplication and test for equality.

16.

What Are The Goals Of Data Structure?

Answer»

It must rich ENOUGH in structure to reflect the ACTUAL RELATIONSHIP of data in real WORLD. The structure should be simple enough for efficient processing of data.

It must rich enough in structure to reflect the actual relationship of data in real world. The structure should be simple enough for efficient processing of data.

17.

What Is Data Structure?

Answer»

A DATA structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance KNOWLEDGE about the relationship between data items allows DESIGNING of EFFICIENT algorithms for the manipulation of data.

A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.