Pseudocode and Algorithm Interpretation Previous Year Questions (PYQs) for CMI Masters in Data Science: 25+ Solved Questions with Step-by-Step Solutions

    Solve 25+ Pseudocode and Algorithm Interpretation previous year questions for CMI Masters in Data Science with answers and detailed solutions. Free sample questions below.

    Pseudocode and Algorithm Interpretation: Solved Questions with Step-by-Step Explanations (5 Problems)

    Question 1 SUB
    1. Consider the following code, in which and are arrays indexed from 0 and lenA and lenB are the numbers of elements in and , respectively.
    Question 2 MSQ

    The two arguments to the function Mystery(A, n) in the code below are: (i) an integer array A indexed from 0, and (ii) the number n of elements in A. Each element of A is an integer from the set {1, 2, ..., n}. The expression [0] * (n+1) creates an array, indexed from 0, that contains zeroes.

    1. A.

      None

    2. B.

      2

    3. C.

      3

    4. D.

      4

    Question 3 MSQ

    Consider the following program. Assume that all variables are integers. Note that x%y computes the remainder after dividing x by y. The division is an integer division. For example, 1/3 will return zero while 10/3 will return 3.

    1. A.

      11001

    2. B.

      10011

    3. C.

      11011

    4. D.

      10101

    Question 4 SUB
    1. Consider the following code, in which and are arrays indexed from 0 and lenA and lenB are the numbers of elements in and , respectively.
    Question 5 SUB

    Questions 10 and 11 are based on the following description.

    chapter
    Pseudocode and Algorithm Interpretation Previous Year Questions (PYQs) for CMI Masters in Data Science: 25+ Solved Questions with Step-by-Step Solutions

    Solve 25+ Pseudocode and Algorithm Interpretation previous year questions for CMI Masters in Data Science with answers and detailed solutions. Free sample que

    A question from this chapter

    Question 1
    1. Consider the following code, in which and are arrays indexed from 0 and lenA and lenB are the numbers of elements in and , respectively.
    Question 2

    The two arguments to the function Mystery(A, n) in the code below are: (i) an integer array A indexed from 0, and (ii) the number n of elements in A. Each element of A is an integer from the set {1, 2, ..., n}. The expression [0] * (n+1) creates an array, indexed from 0, that contains zeroes.

    Question 3

    Consider the following program. Assume that all variables are integers. Note that x%y computes the remainder after dividing x by y. The division is an integer division. For example, 1/3 will return zero while 10/3 will return 3.

    Question 4
    1. Consider the following code, in which and are arrays indexed from 0 and lenA and lenB are the numbers of elements in and , respectively.
    Question 5

    Questions 10 and 11 are based on the following description.

    Free preview ends here

    Login to view the complete previous-year questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.