PREVIOUS YEAR SOLVED PAPERS MCQ - July 2016 Paper 3

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

The number of different binary trees with 6 nodes is fact(2n) / fact(n+1) * fac(n) where n is no nodes:
If n= 6, then fact(2 * n) / fact(n+1) * fac(n)
= fact(2 * 6) / fact(6 + 1) * fact(6)
= fact(12) / fact(7) * fact(6)
= 12 * 11 * 10 * 9 * 8 * fact(7) / fact(7) * fact(6)
= 12 * 11 * 10 * 9 * 8 / 6 * 5 * 4 * 3 * 2
= 6 * 11 * 2
= 132.
So, option (C) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption B
Rate difficulty Rate difficulty:
Choose a difficulty.
Share this question
Share:

There are n(n-1)/2 pairs such that i < j. For a pair (ai, aj), probability of being inversion is 1/2. Therefore expected value of inversions = 1/2 * (n(n-1)/2) = n(n-1)/4.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

For max heap we will compare parent node(i) with its left-child(2 * i) and right-child(2 * i + 1):
  • In first option node(2) < node(5) which is violating the max-heap property.
  • In second option node node(2) < node(5) which is violating the max-heap property.
  • In third option there is no violation.
  • In fourth option node(3) < node(7) which is violating the max-heap property.
  • So, option (C) is correct.
    Cancel reply

    Your email address will not be published. Required fields are marked *


    Cancel reply

    Your email address will not be published. Required fields are marked *

    Correct AnswerOption C
    Rate difficulty Rate difficulty:
    Choose a difficulty.
    • Huffman codes takes O(nlgn) time.
    • Optimal polygon triangulation takes θ(n3) time
    • Activity selection problem takes θ(n) time 
    • Quicksort takes O(n2) time
    So, option (C) is correct.
    Cancel reply

    Your email address will not be published. Required fields are marked *


    Cancel reply

    Your email address will not be published. Required fields are marked *

    Correct AnswerOption C
    Rate difficulty Rate difficulty:
    Choose a difficulty.

    We have to find 364 in BST:
  • In first option 925 is root node, our key is less then 925 so we go for left BST. Next node is 221 → 912 → 245 → 899 → 259 → 363 → 364 respectively.
  • In second option 3 is root node, we go for right BST i.e. 400 → 388 → 220 → 267 → 383 → 382 → 279 → 364 respectively.
  • In third option 926 is root node, we go for left BST i.e. 203 → 912 → 241 next key is 913 we cant go for 913 after 241 because we are already in left BST of 912 our key will be surely in left BST of 912. This option is incorrect.
  • In fourth option 3 is root node, we go for right BST i.e. 253 → 402 → 399 → 331 → 345 → 398 → 364.
  • So, option (C) is correct.
    Cancel reply

    Your email address will not be published. Required fields are marked *


    Cancel reply

    Your email address will not be published. Required fields are marked *

    Why Practice with Avatto?
    High Quality MCQsExam-focused questions with accurate answers
    Detailed ExplanationsStep-by-step explanations to enhance learning
    Latest Exam PatternBased on updated syllabus and pattern
    Performance AnalyticsTrack performance and improve weak areas
    100% Free PracticePractice unlimited questions for free