## Data Structure

Welcome to NTA NET ASPIRANT ACADEMY

NTA NET ASPIRANT ACADEMY is a training academy for College Lectures, Assistant Professor, Research Scholar and PG Students to make qualified for Assistant Professor & JRF in UGC NET / TNSET

NTA NET ASPIRANT ACADEMY is a training academy for College Lectures, Assistant Professor, Research Scholar and PG Students to make qualified for Assistant Professor & JRF in UGC NET / TNSET

Start

Congratulations - you have completed

*Data Structure*. You scored %%SCORE%% out of %%TOTAL%%. Your performance has been rated as %%RATING%%
Your answers are highlighted below.

Question 1 |

In a binary max heap containing n numbers, the smallest element can be found in _________ time.

**NTA NET JUNE 2020**A | O(n) |

B | O(log n) |

C | O(1) |

D | O(log log n) |

Question 2 |

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 variable length.

C. A hash function may give same hash value for distinct message.

Choose the correct answer from the options given below:

**NTA NET JUNE 2020**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 variable length.

C. A hash function may give same hash value for distinct message.

Choose the correct answer from the options given below:

A | (A) only |

B | (B) and (C) only |

C | (A) and (C) only |

D | (B) only |

Question 3 |

Let G be a directed graph whose vertex set is the set of numbers from 1 to 100. There is an edge from a vertex i to a vertex j if and only if either j=i+1 or j=3i. The minimum number of edges in a path in G from vertex 1 to vertex 100 is _____

**NTA NET JUNE 2020**A | 23 |

B | 99 |

C | 4 |

D | 7 |

Question 4 |

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 accomodated.

**NTA NET December 2019**A | θ(1), θ(n) |

B | θ(n), θ(1) |

C | θ(1), θ(1) |

D | θ(n), θ(n) |

Question 5 |

When using Dijkstra's algorithm to find the shortest path in a graph. Which of the following statement is not true?

**NTA NET December 2019**A | It can find shortest path within the same graph data structure. |

B | Every time a new node is visited, we choose the node with smallest known distance / cost to visit first. |

C | Shortest path always passes through least number of vertices. |

D | The graph needs to have a non negative weight on every edge. |

Question 6 |

The time complexity to multiply two polynomials of degree n using Fast Fourier transform method is

**NTA NET December 2019**A | θ(n lg n) |

B | θ(n^2) |

C | θ(n) |

D | θ(lg n) |

Question 7 |

Suppose that a connected planar graph has six vertices, each of degree four. Into how many regions is the plane divided by a planar representation of this graph?

**NTA NET JUNE 2019**A | 6 |

B | 8 |

C | 12 |

D | 20 |

Question 8 |

Which of the following is application of depth - first search?

**NTA NET JUNE 2019**A | Only topological sort |

B | Only strongly connected components |

C | Both topological sort and strongly connected components |

D | Neither topological sort nor strongly connected components |

Question 9 |

There are many sorting algorithms based on comparison The running time of heapsort algorithm is O(nlogn). Like P, but unlike Q, heapsort sorts in place where (P,Q) is equal to

A | Merge Sort, Quick Sort |

B | Quick Sort, Insertion Sort |

C | Insertion Sort, Quick Sort |

D | Insertion Sort, Merge Sort |

Question 10 |

Which data structure is used by the compiler for managing variables and their attributes?

**NTA NET JUNE 2019**A | Binary tree |

B | Link list |

C | Symbol table |

D | Parse table |

Question 11 |

Which of the following is best running time to sort n integers in the range 0 to n

^{2}-1?**NTA NET JUNE 2019**A | O(logn) |

B | O(n) |

C | O(nlogn) |

D | O(n^2) |

Question 12 |

The solution of the recurrence relation

**CBSE NET JULY 2018**T(m) = T(3m/4) + 1 is :A | θ(lg m) |

B | θ(m) |

C | θ(mlg m) |

D | θ(lglg m) |

Question 13 |

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).

**CBSE NET JULY 2018**A | 3, 14 |

B | 3, 10 |

C | 4, 14 |

D | 4, 10 |

Question 14 |

A hash function h is 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?

**CBSE NET JULY 2018**A | 3 |

B | 4 |

C | 5 |

D | 6 |

Question 15 |

Which of the following algorithms solves the single - source shortest paths?

**CBSE NET JULY 2018**A | Prim's Algorithm |

B | Floyd - Warshall Algorithm |

C | Johnson's Algorithm |

D | Dijkstra's Algorithm |

Question 15 Explanation:

Floyd - Warshall Algorithm - All Pair shortest path algorithm
Dijikstra's Algorithm: Single Source Shortest path algorithm.

Question 16 |

A text is made up of the characters A, B, C, D, E each occurring with the probability 0.08, 0.40, 0.25, 0.15 and 0.12 respectively. The optimal coding technique will have the average length of:

**CBSE NET JULY 2018**A | 2.4 |

B | 1.87 |

C | 3.0 |

D | 2.15 |

Question 17 |

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:

**CBSE NET JULY 2018**A | Cannot have more than 37 nodes |

B | has exactly 37 nodes |

C | has exactly 35 nodes |

D | cannot have more than 35 nodes |

Question 18 |

Match the following with respect to algorithm paradigms:

**CBSE NET JULY 2018**List - I | List - II |
---|---|

A. The 8 - Queen's problem | (i) Dynamic programming |

B. Single Source shortest paths | (ii) Divide and conquer |

C. STRASSEN's Matrix multiplication | (iii) Greedy approach |

D. Optimal binary search trees | (iv) Backtracking |

A | A - iv, B - i, C - iii, D - ii |

B | A - iv, B - iii, C - i, D - ii |

C | A - iii, B - iv, C - ii, D - i |

D | A - iv, B - iii, C - ii, D - i |

Question 19 |

The maximum number of comparisons needed to sort 9 items using radix sort is (assume each item is 5 digit octal number):

**CBSE NET JULY 2018**A | 45 |

B | 72 |

C | 360 |

D | 450 |

Question 20 |

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:

**CBSE NET JULY 2018**A | 30 |

B | 33 |

C | 45 |

D | 125 |

Question 21 |

Consider a Boolean function of 'n' variables. The order of an algorithm that determines whether the Boolean function produces a output 1 is:

**CBSE NET JULY 2018**A | Logarithmic |

B | Linear |

C | Quadratic |

D | Exponential |

Question 22 |

The solution of recurrence relation:

T(n) = 2T(sqrt(n)) + lg(n)

**NTA NET December 2018**T(n) = 2T(sqrt(n)) + lg(n)

A | O(lg(n)) |

B | O(n lg(n)) |

C | O(lg(n) lg(n)) |

D | O(lg(n) lg (lg(n))) |

Question 23 |

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 is

**NTA NET December 2018**A | <42, 40, 35, 25, 22, 30, 26> |

B | <42, 35, 40, 22, 25, 30, 26> |

C | <42, 40, 35, 25, 22, 26, 30> |

D | <42, 35, 40, 22, 25, 26, 30> |

Question 24 |

Consider two sequences X and Y:

X = {0, 1, 2, 1, 3, 0, 1}

Y = {1, 3, 2, 0, 1, 0}

The length of the longest common subsequence between X and Y is

**NTA NET December 2018**X = {0, 1, 2, 1, 3, 0, 1}

Y = {1, 3, 2, 0, 1, 0}

The length of the longest common subsequence between X and Y is

A | 2 |

B | 3 |

C | 4 |

D | 5 |

Question 25 |

Consider the following postfix expression with single digit operands:

The top two elements of the stack after the second * is evaluated, are:

**NTA NET December 2018****6 2 3 * / 4 2 * + 6 8 * -**The top two elements of the stack after the second * is evaluated, are:

A | 8, 2 |

B | 8, 1 |

C | 6, 2 |

D | 6, 3 |

Question 26 |

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 subtree is

**NTA NET December 2018**60, 25, 72, 15, 30, 68, 101, 13, 18, 47, 70, 34

The number of nodes is the left subtree is

A | 5 |

B | 6 |

C | 7 |

D | 3 |

Question 27 |

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

**NTA NET December 2018**A | 9 |

B | 10 |

C | 11 |

D | 12 |

Question 28 |

Match List I with List II and choose the correct answer from the code given below:

where V and E are the number of vertices and edges in graph respectively.

**NTA NET December 2018**List - I (Graph ALgorithm) | List - II (Time complexity) |
---|---|

A. Dijkstra's Algorithm | (i) O(E lgE) |

B. Kruskal's Algorithm | (ii) Θ(V^{3}) |

C. Floyd-Warshall algorithm | (iii) O(V^{2}) |

D. Topological sorting | (iv) Θ(V+E) |

A | A - i, B - iii, C - ii, D - iv |

B | A - iii, B - i, C - ii, D - iv |

C | A - i, B - iii, C - iv, D - ii |

D | A - iii, B - i, C - iv, D - ii |

Question 29 |

In K-coloring of an undirected graph G = (V,E) is a function c:V → {0,1,2,....,K - 1} such that c(u) ≠ c(v) for every edge (u,v) ϵ E. Which of the following is

**correct?***not***NTA NET December 2018**A | G is bipartite |

B | G is 2 - colorable |

C | G has cycles of odd length |

D | G has no cycles of odd length |

Question 30 |

Consider a 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?

**NTA NET December 2018**A | O(n lg n) |

B | O(n) |

C | O(lg n) |

D | O(1) |

Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results

There are 30 questions to complete.

You have completed

questions

question

Your score is

Correct

Wrong

Partial-Credit

You have not finished your quiz. If you leave this page, your progress will be lost.

Correct Answer

You Selected

Not Attempted

Final Score on Quiz

Attempted Questions Correct

Attempted Questions Wrong

Questions Not Attempted

Total Questions on Quiz

Question Details

Results

Date

Score

Hint

Time allowed

minutes

seconds

Time used

Answer Choice(s) Selected

Question Text

All done

Need more practice!

Keep trying!

Not bad!

Good work!

Perfect!