Data Structure NTA UGC NET Question Analysis

Data Structure NTA UGC NET Question Analysis


Q.1➡ | UGC NET DEC 2023
Which data structure is typically used to implement hash table?
i ➥ Linked list
ii ➥ Array
iii ➥ Binary Tree
iv ➥ Stack
Best Explanation:
Answer: (II)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.2➡ | UGC NET DEC 2023
Which of the following graphs are trees ?
Which of the following graphs are trees 1 Which of the following graphs are trees 1

Which of the following graphs are trees 1 Which of the following graphs are trees 1

Choose the correct answer from the options given below :
i ➥ (A) and (B) Only
ii ➥ (A), (B) and (D) Only
iii ➥ (A) and (D) Only
iv ➥ (A), (B), (C) and (D) Only
Best Explanation:
Answer: (I)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.3➡ | UGC NET DEC 2023
Which collision resolution technique involves maintaining a linked list of collided keys?
i ➥ Linear probing
ii ➥ Quadratic probing
iii ➥ Chaining
iv ➥ Double hashing
Best Explanation:
Answer: (III)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line
Q.4➡ | UGC NET DEC 2023
What is the result of evaluating the postfix expression “43*25*+b-“?
i ➥ 8
ii ➥ 14
iii ➥ 10
iv ➥ 5
Best Explanation:
Answer: (I)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line
Q.5➡ | UGC NET DEC 2023
Which of the following symbol table implementation is best suited if access time is to be minimum?
i ➥ Linear list
ii ➥ Search tree
iii ➥ Hash Table
iv ➥ Self organisation list
Best Explanation:
Answer: (III)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.6➡ | UGC NET JUNE 2023
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason
R.
Assertion A: The AVL trees are more balanced as compared to Red Black trees, but they may cause more rotations during insertion and deletion
Reason R: A Red Black tree with n nodes has height that is greater than 2 log2(n + 1) and the AVL tree with n nodes has height less than logo (√√5(n+2)) - 2 (where is golden ratio) In the light of the above statements , choose the correct answer from the options given below.
i ➥ Both A and R are correct and R is the correct explanation of A
ii ➥ Both A and R are correct and R is NOT the correct explanation of A
iii ➥ A is true but R is false
iv ➥ A is false but R is true
Best Explanation:
Answer: III A is true but R is false(* according ugc)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.7➡ | UGC NET JUNE 2023
Suppose a circular queue of capacity ( n−1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variable respectively. Initially,
REAR=FRONT=0. The conditions to detect queue empty and queue full are
i ➥ EMPTY: REAR ==FRONT
FULL : ( REAR+1) mod n== FRONT
ii ➥ EMPTY: ( FRONT +1)mod n== REAR
FULL: REAR+1 mod n==FRONT
iii ➥ EMPTY REAR+1) mod n==FRONT
FULL: REAR == FRONT
iv ➥ EMPTY: REAR== FRONT
FULL: ( FRONT+1) mod n== REAR
Best Explanation:
Answer: I
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.8➡ | UGC NET JUNE 2023
The total cost of retrieving records in sorted order using an unclustered B+ tree is
(P-Average number of records per data page
N- Data pages
F- Ratio of the size of a data entry to the size of a data record)
i ➥ (F*N)+P
ii ➥ (F+N)*P
iii ➥ F*N*P
iv ➥ F+P/N
Best Explanation:
Answer: II
Explanation:
The total cost of retrieving records in sorted order using an unclustered B+ tree is 
(P-Average number of records per data page
N- Data pages 
F- Ratio of the size of a data entry to the size of a data record)

i ➥   (F*N)+P
ii ➥   (F+N)*P
iii ➥  F*N*P
iv ➥   F+P/N
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.9➡ | UGC NET JUNE 2023
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.
Assertion A: It is possible to create doubly linked list using only one pointer with every node.
Reason R: By storing the XOR of the addresses of the previous and next nodes.

In the light of the above statements, choose the most appropriate answer from the options given below.
i ➥ Both A and R are true and R is the correct explanation of A
ii ➥ Both A and R are true but R is NOT the correct explanation of A
iii ➥ A is true but R is false
iv ➥ A is false but R is true
Best Explanation:
Answer: I
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.10➡ | UGC NET JUNE 2023
A three dimensional array in C ++ is declared as int A[a][b] [c]. Consider that array elements are stored in row major order and indexing begin from 0. Here the address of an item at the location A[r][s][t] computed in terms of word length w of an integer is
i ➥
ii ➥
iii ➥
iv ➥
Best Explanation:
Answer: II
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.11➡ | UGC NET JUNE 2023
Consider a hash table of size seven with starting index zero and a hash function (6x+3)mod 4. Assuming the hash table is initially empty. Which of the following is the content of the table when the sequence 1,3,8,10,5, is inserted into the table using closed hashing? Here ” denotes an empty location in the table.
i ➥ 1,3,8,10,5,_,_
ii ➥ 3,8,1,_,10,5
iii ➥ _,3,8,1,_,10,5
iv ➥ _1,3,8,10,5,_
Best Explanation:
Answer: IV (ACCORDING TO UGC *) MAY BE (II)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line
Q.12➡ | NET December 2022
How many different tree are possible with ‘n’ nodes?
i ➥ n-1
ii ➥ 2n-1
iii ➥ 2n
iv ➥ 2n-n
Best Explanation:
Answer: Mark to ALL
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.13➡ | NET December 2022
Given an expression
(A + B*D) / (E-F) + G
(A) The prefix notation is +/+A*DB-EFG
(B) The prefix expression is the reverse of the postfix expression
(C) The order of operands in infix expression and postfix expression are the same.
(D) The order of operands in infix expression, prefix expression and postfix expression are the same
Choose the most appropriate answer from the options given below:
i ➥ A, C and D only
ii ➥ C and D only
iii ➥ A and B only
iv ➥ A and D only
Best Explanation:
Answer: (ii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.14➡ | NET June 2022
How many rotations are required during the construction of an AVL tree if the following elements are to be added in the given sequence?
35, 50, 40, 25, 30, 60, 78, 20, 28
i ➥ 2 left rotation, 2 right rotation
ii ➥ 2 left rotation, 3 right rotation
iii ➥ 3 left rotation, 2 right rotation
iv ➥ 3 left rotation, 1 right rotation
Best Explanation:
Answer: (iii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.15➡ | NET June 2022
Consider the hash table of size 11 that uses open addressing with linear probing. Let h(k) = k mod 11 be the hash function. A sequence of records with keys 43, 36, 92, 87, 11, 47, 11, 13, 14 is inserted into an initially empty hash table. The bins of which are indexed from 0 to 10. What is the index of the bin into which the last record is inserted?
i ➥ 8
ii ➥ 7
iii ➥ 10
iv ➥ 4
Best Explanation:
Answer: (ii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.16➡ | NET June 2022
Consider a B-tree of height h , minimum degree t≥2 that contains any n-key, where n≥1 which of the following is correct?
i ➥ h≥logt(n+1\2)
ii ➥ h≤ logt(n+1\2)
iii ➥ h≥ logt(n-1\2)
iv ➥ h≤ logt(n-1\2)
Best Explanation:
Answer: (ii)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.17➡ | NET June 2022
Consider the following graph:
For the graph : the following sequences of depth first search (DFS) are given 
(A)	abcghf
(B)	abfchg
(C)	abfhgc
(D)	afghbc
Which of the following is correct?
For the graph : the following sequences of depth first search (DFS) are given
(A) abcghf
(B) abfchg
(C) abfhgc
(D) afghbc
Which of the following is correct?
i ➥ (A), (B) and (D) only
ii ➥ (A) ,(B) and (D) only
iii ➥ (B), (C) and (D) only
iv ➥ (A), (C) and (D) only
Best Explanation:
Answer: (iv)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.18➡ | NET June 2022
The Number of nodes of height h in any n-element heap is atmost :
i ➥ n/2h+1
ii ➥ n/2h-1
iii ➥ n/2h
iv ➥ n-1/2h-1
Best Explanation:
Answer: (i)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.19➡ | NET June 2022
Consider the traversal of a tree
Preorder → ABCEIFJDGHKL
Inorder → EICFJBGDKHLA
Which of the following is correct post order traversal ?
i ➥ EIFJCKGLHDBA
ii ➥ FCGKLHDBUAE
iii ➥ FCGKLHDBAEIJ
iv ➥ IEJFCGKLHDBA
Best Explanation:
Answer: (iv)
Explanation: Upload Soon
More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.20➡ | Data Structure
Two balanced binary trees are given with m and n elements, respectively. They can be merged into a balanced binary search tree in time.
i ➥ O(m*log n)
ii ➥ O(m*log(m+n))
iii ➥ O(m*n)
iv ➥ O(m+n)

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTube binary trees Help-Line

Q.21➡ | NTA UGC NET November 2020
Let G be a simple undirected graph, TD be a DFS tree on G, and TB be the BFS tree on G. Consider the following statements.
Statement I: No edge of G is a cross with respect to TD
Statement II: For every edge (u,v) of G, if u is at depth i and v is at depth j in TB then |i-j|=1

In the light of the above statements, choose the correct answer from the options given below:
i➥ Both Statement I and Statement II are true
ii ➥ Both Statement I and Statement II are false
iii ➥ Statement I is correct but Statement II is false
iv ➥ Statement I is incorrect but Statement II is true

Show Answer With Best Explanation

Answer: III
Explanation:
Statement I: True. TD be a DFS tree on G, & there is no edge cross with respect to any Tree but can have cross in directed graphs.
Statement II: False. This is not always correct.

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.22➡ | NTA UGC NET November 2020
Which among the following statement(s) is (are) true?
A) A hash function takes a message of arbitrary length and generates a fixed length code.
B) A hash function takes a message of fixed length and generates a code of variables.
C) A hash function may give the same value for distinct messages.

Choose the correct answer from the options given below:
i➥ (A) only
ii ➥ (B) and (C) only
iii ➥ (A) and (C) only
iv ➥ (B) only

Show Answer With Best Explanation

Answer: III
Explanation:



Answer is III

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.23➡ | NTA UGC NET November 2020
A complete n-ary tree is a tree in which nodes have children or no children. Let I be the number of internal nodes and L be the number of leaves in a complete n-ary tree. If L=41, and I=10, what is the value of n?
i➥ 3
ii ➥ 4
iii ➥ 5
iv ➥ 6

Show Answer With Best Explanation

Answer: III
Explanation:
L = (n-1) * I + 1
where,
L = Leaf Node, I = Internal Node, n = n-ary Tree
L = (n-1)*I +1
41 = (n-1) * 10 +1
41 = 10n -10 +1
10n = 50
n = 5

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.24➡ | NTA UGC NET November 2020
In a binary max heap containing n numbers, the smallest element can be found in_____ time.
i➥ O(n)
ii ➥ O(log2 n)
iii ➥ O(1)
iv ➥ O(log2 log2 n)

Show Answer With Best Explanation

Answer: I
Explanation:


As we know the structure of MAX heap.


In a max heap, the smallest element is always present at a leaf node.
As we know the heap being a complete binary tree, there can be up to n/2 leaf nodes.
If we are going to examine all of them, we would need O(n) time.
Correct Answer is (I)

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.25➡ | NTA UGC NET December 2019
A tree has 2n vertices of degree 1, 3n vertices of degree 2, n vertices of degree 3. Determine the number of vertices and edges in tree.
i➥ 12,11
ii ➥ 11,12
iii ➥ 10,11
iv ➥ 9,10

Show Answer With Best Explanation

Answer: I

Explanation:
By Handshaking theorem,
Sum of the Degree of vertices = 2 * Number of Edges
2n1 + 3n2 + n3 = 2E 2n + 6n + 3n = 2E E = 11n/2 —————— equation (1) We know , In Tree Number of vertices = Number of edges + 1 2n + 3n + n = 11n/2 + 1 6n = 11n/2 +1 12n = 12n + 2 n = 2 put n =2 in eqution (1), we got E = 11n/2 E = 112 / 2
E = 11
Number of vertices = number of edges + 1
V = E + 1
V = 11 + 1
V = 12

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.26➡ | NTA UGC NET December 2019
What is the worst case running time of Insert and Extract-min, in an implementation of a priority queue using an unsorted array? Assume that all insertions can be accommodated.
i➥ θ(1) , θ(n)
ii ➥ θ(n) , θ(1)
iii ➥ θ(1) , θ(1)
iv ➥ θ(n) , θ(n)

Show Answer With Best Explanation

Answer: I
Explanation:

In the worst case running time of insert in unsorted Array,
we can simply insert an element at the end of the unsorted array, it would need Θ (1) time.
Worst case complexity is Θ(1).
——————————————————————————————–
In the worst case running time extract min, there is no specific algorithm for extract min. So, the linear search is an only way to extract min on the unsorted array. it would need Θ (n) time.
Worst case complexity is Θ(n).
So. the correct answer is (I)

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.27➡ | NTA UGC NET December 2019
B-Tree, each node represents a disk block. Suppose one block holds 8192 bytes. Each key uses 32 bytes. In a B-tree of order M there are M – 1 keys. Since each branch is on another disk block, we assume a branch is of 4 bytes. The total memory requirement for a non-leaf node is
i➥ 32 M – 32
ii ➥ 36 M – 32
iii ➥ 36 M – 36
iv ➥ 32 M – 36

Show Answer With Best Explanation

Answer: II

Explanation:
It is given that ,
Block pointer = 4 byte
Record pointer = 0 , {consider it as 0 because it is not given in the question}
Search Key value = 32 byte
Size of non-leaf node in B Tree = m * Block pointer + (m – 1)*(search key value + record pointer)
= m * 4 + (m-1)*(32 + 0)
= 4m + 32m -32
= 36m – 32

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line
Q.28➡ | NTA UGC NET December 2019
What is the worst case running time of Insert and Extract-min, in an implementation of a priority queue using an unsorted array? Assume that all insertions can be accommodated.
i➥ θ(1) , θ(n)
ii ➥ θ(n) , θ(1)
iii ➥ θ(1) , θ(1)
iv ➥ θ(n) , θ(n)

Show Answer With Best Explanation

Answer: I
Explanation:

In the worst case running time of insert in unsorted Array,
we can simply insert an element at the end of the unsorted array, it would need Θ (1) time.
Worst case complexity is Θ(1).
——————————————————————————————–
In the worst case running time extract min, there is no specific algorithm for extract min. So, the linear search is an only way to extract min on the unsorted array. it would need Θ (n) time.
Worst case complexity is Θ(n).
So. the correct answer is (I)

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.29➡ | NTA UGC NET December 2019
Consider a weighted directed graph. The current shortest distance from source S to node x is represented by d[v]=29. d[u] = 15, w[u, v] = 12. What is the updated value of d[u] based on current information
i ➥ 29
ii ➥ 27
iii ➥ 25
iv ➥ 17

Show Answer With Best Explanation

Answer: II
Explanation:

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.30➡ | NTA UGC NET June 2019
Which of the following is an application of depth-first search?
i ➥ Only topological sort
ii ➥ Only strongly connected components
iii ➥ Both topological sort and strongly connected components
iv ➥ Neither topological sort not strongly connected components

Show Answer With Best Explanation

Answer: III
Explanation:

correct answer is (III)

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.31➡ | NTA UGC NET June 2019
Consider double hashing of the form
h(k,i)=(h 1 (k)+ih 2 (k)) mod m
Where h 1 (k)=k mod m
h 2 (k)=1+(k mod n)
Where n=m-1and m=701
for k=123456, what is the difference between first and second probes in terms of slots?
i ➥ 255
ii ➥ 256
iii ➥ 257
iv ➥ 258

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.32➡ | NTA UGC NET December 2018
The elements 42, 25, 30, 40, 22, 35, 26 are inserted one by one in the given order into a max-heap. The resultant max-heap is stored in an array implementation as
i ➥ <42, 35, 40, 22, 25, 26, 30>
ii ➥ <42, 35, 40, 22, 25, 30, 26>
iii ➥ <42, 40, 35, 25, 22, 26, 30>
iv ➥ <42, 40, 35, 25, 22, 30, 26>

Show Answer With Best Explanation

Answer: IV
Explanation:

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.33➡ | NTA UGC NET December 2018
Consider the following postfix expression with single digit operands :
6 2 3 * / 4 2 * + 6 8 * –
The top two elements of the stack after second * is evaluated, are :
i ➥ 6, 3
ii ➥ 8, 1
iii ➥ 8, 2
iv ➥ 6, 2

Show Answer With Best Explanation

Answer: II
Explanation:

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.34➡ | NTA UGC NET December 2018
Consider the singly linked list. What is the worst case time complexity of the best-known algorithm to delete the node a, pointer to this node is q, from the list ?
i ➥ O(1)
ii ➥ O(lg n)
iii ➥ O(n)
iv ➥ O(n lg n)

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.35➡ | NTA UGC NET December 2018
In a ternary tree, the number of internal nodes of degree 1,2 and 3 is 4,3 and 3 respectively. The number of leaf nodes in the ternary tree is
i ➥ 11
ii ➥ 12
iii ➥ 10
iv ➥ 9

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.36➡ | NTA UGC NET December 2018
A binary search tree is constructed by inserting the following numbers in order:
60, 25, 72, 15, 30, 68, 101, 13, 18, 47, 70, 34
The number of nodes is the left sub-tree is.
i ➥ 7
ii ➥ 6
iii ➥ 3
iv ➥ 5

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.37➡ | NTA UGC NET December 2018
An attribute A of data type varchar(20) has the value ‘xyz’ and attribute B of data type char(20) has the value “Imnop” , then the attribute A has _____ spaces and attribute B has_________spaces.
i ➥ 20, 20
ii ➥ 3, 20
iii ➥ 3, 5
iv ➥ 20, 5

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.38➡ | NTA UGC NET JUNE 2018
A binary search tree in which every non-leaf node has non-empty left and right subtrees is called a strictly binary tree. Such a tree with 19 leaves :
i ➥ cannot have more than 37 nodes
ii ➥ has exactly 37 nodes
iii ➥ has exactly 35 nodes
iv ➥ cannot have more than 35 nodes

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.39➡ | NTA UGC NET JUNE 2018
A 5-ary tree is tree in which every internal node has exactly 5 children. The number of left nodes in such a tree with 8 internal nodes will be :
i ➥ 30
ii ➥ 33
iii ➥ 45
iv ➥ None of the above

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.40➡ | NTA UGC NET JUNE 2018
Consider a hash table of size seven, with starting index zero, and a hash function (7x+3) mod 4. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence 1, 3, 8, 10 is inserted into the table using closed hashing ? Here “___” denotes an empty location in the table.
i ➥ 3, 10, 1, 8,__ ,____,___,
ii ➥ 1, 3, 8, 10,___,___,___.
iii ➥ 1,___,3,___, 8,,10
iv ➥ 3,10,___,___, 8,___,___.

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.41➡ | NTA UGC NET JUNE 2018
Consider the array A=<4, 1, 3, 2, 16, 9, 10, 14, 8, 7>. After building heap from the array A, the depth of the heap and the right child of max-heap are__________ and ________respectively. (Root is at level 0).
i ➥ 3, 14
ii ➥ 3, 10
iii ➥ 4, 14
iv ➥ 4, 10

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.42➡ | NTA UGC NET JUNE 2018
A hash function h defined h(key)=key mod 7, with linear probing, is used to insert the keys 44, 45, 79, 55, 91, 18, 63 into a table indexed from 0 to 6. What will be the location of key 18 ?
i ➥ 3
ii ➥ 4
iii ➥ 5
iv ➥ 6

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.43➡ | NTA UGC NET November 2017 Paper-3
Consider a full binary tree with n internal nodes, internal path length i, and external path length e. The internal path length of a full binary tree is the sum, taken over all nodes of the tree, of the depth of each node. Similarly, the external path length is the sum, taken over all leaves of the tree, of the depth of each leaf. Which of the following is correct for the full binary tree?
i ➥ e = i+n
ii ➥ e = i+2n
iii ➥ e = 2i+n
iv ➥ e = 2n+i

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.44➡ | NTA UGC NET November 2017 Paper-3
Which of the following addressing mode is best suited to access elements of an array of contiguous memory locations ?
i ➥ Indexed addressing mode
ii ➥ Base Register addressing mode
iii ➥ Relative address mode
iv ➥ Displacement mode

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.45➡ | NTA UGC NET January 2017 Paper-2
Which of the following statements is false ?
(A) Optimal binary search tree construction can be performed efficiently using dynamic programming.
(B) Breadth-first search cannot be used to find connected components of a graph.
(C) Given the prefix and postfix walks of a binary tree, the tree cannot be re-constructed uniquely.
(D) Depth-first-search can be used to find the connected components of a graph.
i ➥ A
ii ➥ B
iii ➥ C
iv ➥ D

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.46➡ | NTA UGC NET January 2017 Paper-2
The seven elements A, B, C, D, E, F and G are pushed onto a stack in reverse order, i.e., starting from G. The stack is popped five times and each element is inserted into a queue.Two elements are deleted from the queue and pushed back onto the stack. Now, one element is popped from the stack. The popped item is __.
i ➥ A
ii ➥ B
iii ➥ F
iv ➥ G

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.47➡ | NTA UGC NET January 2017 Paper-2
If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n ≤ m, the expected number of collisions involving a particular key x is less than____.
i ➥ 1
ii ➥ 1/n
iii ➥ 1/m
iv ➥ n/m

Show Answer With Best Explanation

Answer: I (Marks to all )
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.48➡ | NTA UGC NET January 2017 Paper-2
Which of the following is true for computation time in insertion, deletion and finding maximum and minimum element in a sorted array ?
i ➥ Insertion – 0(1), Deletion – 0(1), Maximum – 0(1), Minimum – 0(1)
ii ➥ Insertion – 0(1), Deletion – 0(1), Maximum – 0(n), Minimum – 0(n)
iii ➥ Insertion – 0(n), Deletion – 0(n), Maximum – 0(1), Minimum – 0(1)
iv ➥ Insertion – 0(n), Deletion – 0(n), Maximum – 0(n), Minimum – 0(n)

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.49➡ | NTA UGC NET January 2017 Paper-2
Which of the following is a valid heap ?
i ➥ A
ii ➥ B
iii ➥ C
iv ➥ D

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.50➡ | NTA UGC NET August 2016 Paper-3
A priority queue is implemented as a max-heap. Initially, it has five elements. The level-order traversal of the heap is as follows: 20, 18, 15, 13, 12 Two new elements ‘10’ and ‘17’are inserted in the heap in that order. The level-order traversal of the heap after the insertion of the element is:
i ➥ 20, 18, 17, 15, 13, 12, 10
ii ➥ 20, 18, 17, 12, 13, 10, 15
iii ➥ 20, 18, 17, 10, 12, 13, 15
iv ➥ 20, 18, 17, 13, 12, 10, 15

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.51➡ | NTA UGC NET August 2016 Paper-2
Consider an undirected graph G where self-loops are not allowed. The vertex set of G is {(i, j) | 1 ≤ i ≤ 12, 1 ≤ j ≤ 12}. There is an edge between (a,b) and (c, d) if |a – c| ≤ 1 or | b–d| ≤ 1. The number of edges in this graph is:
i ➥ 726
ii ➥ 796
iii ➥ 506
iv ➥ 616

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.52➡ | NTA UGC NET August 2016 Paper-2
Consider the following statements:
S1: A queue can be implemented using two stacks.
S2: A stack can be implemented using two queues.
Which of the following is correct?
i ➥ S 1 is correct and S 2 is not correct.
ii ➥ S 1 is not correct and S 2 is correct.
iii ➥ Both S 1 and S 2 are correct.
iv ➥ Both S 1 and S 2 are incorrect.

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.53➡ | NTA UGC NET August 2016 Paper-2
Given the following prefix expression:
* + 3 + 3 ↑ 3 + 3 3 3
What is the value of the prefix expression ?
i ➥ 2178
ii ➥ 2199
iii ➥ 2205
iv ➥ 2232

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.54➡ | NTA UGC NET July 2016 Paper-3
The number of different binary trees with 6 nodes is __.
i ➥ 6
ii ➥ 42
iii ➥ 132
iv ➥ 256

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.55➡ | NTA UGC NET July 2016 Paper-3
Suppose that we have numbers between 1 and 1,000 in a binary search tree and want to search for the number 364. Which of the following sequences could not be the sequence of nodes examined ?
i ➥ 925, 221, 912, 245, 899, 259, 363, 364
ii ➥ 3, 400, 388, 220, 267, 383, 382, 279, 364
iii ➥ 926, 203, 912, 241, 913, 246, 364
iv ➥ 3, 253, 402, 399, 331, 345, 398, 364

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.56➡ | NTA UGC NET July 2016 Paper-3
Which one of the following arrays represents a binary max-heap?
i ➥ [26, 13, 17, 14, 11, 9, 15]
ii ➥ [26, 15, 14, 17, 11, 9, 13]
iii ➥ [26, 15, 17, 14, 11, 9, 13]
iv ➥ [26, 15, 13, 14, 11, 9, 17]

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.57➡ | NTA UGC NET July 2016 Paper-2
Which of the following is not an inherent application of stack?
i ➥ Implementation of recursion
ii ➥ Evaluation of a postfix expression
iii ➥ Job scheduling
iv ➥ Reverse a string

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.58➡ | NTA UGC NET July 2016 Paper-2
Suppose you are given a binary tree with n nodes, such that each node has exactly either zero or two children. The maximum height of the tree will be
i ➥ (n/2) -1
ii ➥ (n/2) +1
iii ➥ (n–1) / 2
iv ➥ (n+1) / 2

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.59➡ | NTA UGC NET July 2016 Paper-2
In how many ways can the string A ∩ B – A ∩ B – A be fully parenthesized to yield an infix expression?
i ➥ 15
ii ➥ 14
iii ➥ 13
iv ➥ 12

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.60➡ | NTA UGC NET July 2016 Paper-2
Consider the following binary search tree:

If we remove the root node, which of the node from the left sub-tree will be the new root?
i ➥ 11
ii ➥ 12
iii ➥ 13
iv ➥ 16

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.61➡ | NTA UGC NET July 2016 Paper-2
Consider the following operations performed on a stack of size 5 : Push (a); Pop() ; Push(b); Push(c); Pop(); Push(d); Pop();Pop(); Push (e) Which of the following statements is correct?
i ➥ Underflow occurs
ii ➥ Stack operations are performed smoothly
iii ➥ Overflow occurs
iv ➥ None of the above

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.62➡ | NTA UGC NET June 2015 Paper-3
Consider a hash table of size m = 100 and the hash function h(k) = floor(m(kA mod 1)) for A = frac{(sqrt5 – 1) 2 = 0.618033 Compute the location to which the key k = 123456 is placed in hash table.
i ➥ 77
ii ➥ 82
iii ➥ 88
iv ➥ 89

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.63➡ | NTA UGC NET December 2015 Paper-3
A three dimensional array in ‘C’ is declared as int A[x][y][z]. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer):
i ➥ &A[0][0][0] + w(y* z* q + z* p + r)
ii ➥ &A[0][0][0] + w(y* z* p + z*q + r)
iii ➥ &A[0][0][0] + w(x *y* p + z* q+ r)
iv ➥ &A[0][0][0] + w(x* y* q + z* p + r)

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.64➡ | NTA UGC NET December 2015 Paper-3
The hash function used in double hashing is of the form:
i ➥ h (k, i) = (h1 (k) + h2 (k) + i) mod m
ii ➥ h (k, i) = ( h1(k) + h2 (k) – i) mod m
iii ➥ h (k, i) = ( h1(k) + i h2 (k)) mod m
iv ➥ h (k, i) = ( h1(k) – i h2 (k)) mod m

Show Answer With Best Explanation

Answer: III
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.65➡ | NTA UGC NET December 2015 Paper-3
The number of disk pages access in B-Tree search, where ‘h’ is height, ‘n’ is the number of keys, and ‘t’ is the minimum degree, is:
i ➥ θ(log n h*t)
ii ➥ θ(log t n*h)
iii ➥ θ(log h n)
iv ➥ θ(log t n)

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.66➡ | NTA UGC NET December 2015 Paper-3
The inorder traversal of the following tree is:
i ➥ 2 3 4 6 7 13 15 17 18 18 20
ii ➥ 20 18 18 17 15 13 7 6 4 3 2
iii ➥ 15 13 20 4 7 1718 2 3 6 18
iv ➥ 2 4 3 13 7 6 15 17 20 18 18

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.67➡ | NTA UGC NET JUNE 2015 Paper-2
Consider the following statements:
(a) Depth first search is used to traverse a rooted tree.
(b) Preorder, Postorder and Inorder are used to list the vertices of an ordered rooted tree.
(c) Huffman’s algorithm is used to find an optimal binary tree with given weights.
(d) Topological sorting provides a labelling such that the parents have larger labels than their children.
Which of the above statements are true?
i ➥ (a) and (b)
ii ➥ (c) and (d)
iii ➥ (a), (b) and (c)
iv ➥ (a), (b), (c) and (d)

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.68➡ | NTA UGC NET JUNE 2015 Paper-2
Level order Traversal of a rooted Tree can be done by starting from root and performing:
i ➥ Breadth First Search
ii ➥ Depth First Search
iii ➥ Root Search
iv ➥ Deep Search

Show Answer With Best Explanation

Answer: I
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.69➡ | NTA UGC NET JUNE 2015 Paper-2
The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __.
i ➥ dbefacg
ii ➥ debfagc
iii ➥ dbefcga
iv ➥ debfgca

Show Answer With Best Explanation

Answer: IV
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

Q.70➡ | NTA UGC NET December 2014 Paper-3
How many PUSH and POP operations will be needed to evaluate the following expression by reverse polish notation in a stack machine (A * B) + (C * D/E) ?
i ➥ 4 PUSH and 3 POP instructions
ii ➥ 5 PUSH and 4 POP instructions
iii ➥ 6 PUSH and 2 POP instructions
iv ➥ 5 PUSH and 3 POP instructions

Show Answer With Best Explanation

Answer: II
Explanation: Upload Soon

More DiscussionExplanation On YouTubeLearn Topic WiseHelp-Line

error: Content is protected !!
Open chat
1
Hi,how Can We Help You ?