📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    How many steps will be required for getting the final

    output for the following input? Input: 111, 81, 62, 40, 63, 36, 173, 29, 141, 74 Directions : Study the following information carefully to answer the questions given below:A number sorting machine, when given an input of numbers, rearranges the numbers in a particular manner step by step as indicated below, till all the numbers are arranged in a particular order. Given below is an illustration of this arrangement. Input: 45, 163, 53, 19, 81, 139, 18, 48, 73, 96 Step I: 18, 45, 163, 53, 19, 81, 139, 48, 73, 96 Step II: 18, 45, 53, 19, 81, 139, 48, 73, 96, 163 Step III: 18, 19, 45, 53, 81, 139, 48, 73, 96, 163 Step IV: 18, 19, 45, 53, 81, 48, 73, 96, 139, 163 Step V: 18, 19, 45, 48, 53, 81, 73, 96, 139, 163 Step VI: 18, 19, 45, 48, 53, 73, 81, 96, 139, 163 (This is the final arrangement and VI is the last step for this input.)
    A 5 Correct Answer Incorrect Answer
    B 6 Correct Answer Incorrect Answer
    C 7 Correct Answer Incorrect Answer
    D 8 Correct Answer Incorrect Answer
    E None of these Correct Answer Incorrect Answer

    Solution

    Input: 111, 81, 62, 40, 63, 36, 173, 29, 141, 74 Step I: 29, 111, 81, 62, 40, 63, 36, 173, 141, 74 Step II: 29, 111, 81, 62, 40, 63, 36, 141, 74, 173 Step III: 29, 36, 111, 81, 62, 40, 63, 141, 74, 173 Step IV: 29, 36, 111, 81, 62, 40, 63, 74, 141, 173 Step V: 29, 36, 40, 111, 81, 62, 63, 74, 141, 173 Step VI: 29, 36, 40, 81, 62, 63, 74, 111, 141, 173 Step VII: 29, 36, 40, 62, 81, 63, 74, 111, 141, 173 Step VIII: 29, 36, 40, 62, 63, 74, 81, 111, 141, 173

    Practice Next
    More Input Output Questions

    Relevant for Exams:

    ask-question