Click to Get updated NTA UGC NET CS Test Series           Study Material for UGC NET Computer Science- 2019

# Data Structures - Algorithms

6:
The concept of order (Big O) is important because

 A. it can be used to decide the best algorithm that solves a given problem B. it determines the maximum size of a problem that can be solved in a given system, in a given amount of time C. Both(a) and (b) D. none of the above Answer Report Discuss Option: C Explanation : Click on Discuss to view users comments. Write your comments here:
7:
The time complexity of an algorithm T(n), where n is the input size, is given by
T( n) = T( n - 1) + 1/n  if n > 1
The order of this algorithm is

 A. log n B. n C. n2 D. nn Answer Report Discuss Option: A Explanation : Click on Discuss to view users comments. Write your comments here:
8:
A text is made up of the characters a, b, c, d, e each occurring with the probability .12, .4, .15, .08 and .25 respectively. The optimal coding technique will have the average length of

 A. 2.15 B. 3.01 C. 2.3 D. 1.78 Answer Report Discuss Option: A Explanation : Using Hoffman's algorithm, code for a is 1111; b is 0; c is 110; d is 1110; e is 10. Average code length is 4 x.12 + 1 x .4 + 3 x.15 + 4 x.08 + 2 x.25 = 2.15 Click on Discuss to view users comments. raj said: (6:04am on Wednesday 5th June 2013) if code for a is 1111 then it must be multiplied by 15 i.e .12x15 refer link http://www.siggraph.org/education/materials/HyperGraph/video/mpeg/mpegfaq/huffman_tutorial.html Write your comments here:
9:
The running time of an algorithm is given by
T(n) = T(n - 1) + T(n - 2) - T(n - 3), if n > 3
n, otherwise.

 A. n B. log n C. nn D. n2 Answer Report Discuss Option: A Explanation : Let us find what is T(4), T(5), T(6) is. T( 4) = T(3) + T(2) - T(1) = 3 + 2 - 1 = 4 T(5) = T(4) + T(3) - T(2) = 4 + 3 - 2 = 5 T(6) = T(5) + T(4) - T(3) = 5 + 4 - 3 = 6 By induction it can be proved that T(n) = n. Hence order is n. Click on Discuss to view users comments. Write your comments here:
10:
The order of an algorithm that finds whether a given Boolean function of 'n' variables, produces a 1 is

 A. constant B. linear C. logarithmic D. exponential Answer Report Discuss Option: A Explanation : Let T(1) = T(2) = T(3) = k (say). Then T(4) = k + k - k = k T(5) = k+ k- k= k. By mathematical induction it can be proved that T(n) = k, a constant. Click on Discuss to view users comments. Write your comments here:

Syllabus covered in this section is-

• Abstract data types
• Algorithms
• Stacks, Queues
• Trees, Binary search trees
• Binary heaps

This Section covers Data Structures Questions Answers using C language .
Who can benefit -

• Any student who is pursuing B.Sc. in Information Technology can also use this Data Structures mcq section.
• Data Structures MCQs can also be used by any student who is pursuing any undergraduate or postgraduate degree in Computer Science.
• Any candidate who has to appear for DOEACC A, B or C level Exam can also use Data Structures Questions Answers to gain credits in their exams.
• Candidates appearing for Kendriya Vidyalya Sangathan Entrance Exam can also use Data Structures Multiple Choice Questions Answers for the preparation of their exams.
• Data Structures Questions Answers can also be used by MCA students for the preparation of their exams.
• You can also get Data Structures mcq pdf if you purchase an e-book from site.

Various Search Terms used for this section are

• ## Data Structures MCQ 