CoreHRx Jobs

Apply in one click, save jobs and take free mock tests.

Register free Log in
Hiring? Post jobs with CoreHRx
My account
user

View & update profile

Pseudocode and Output Questions mock test: free online practice

15 to 30 random questions in 15 to 30 minutes, by the level you choose: trace loops, recursion, arrays, strings and bitwise logic in pseudocode. After you submit you get your score, your strong and weak topics, and the right answer with an explanation for every question.

Choose your level

Free with a CoreHRx Jobs account: you will be asked to sign in or create one first.

What does the Pseudocode and Output Questions mock test cover?

The test covers 13 topics across three levels. Each attempt picks 15 to 30 questions at random, by the level you choose, so every attempt is different.

  • Loops and Tracing
  • Arrays
  • Bitwise Operations
  • Functions
  • Nested Loops
  • Number Logic
  • Recursion
  • Variables and Operators
  • Complexity
  • Conditions
  • Searching and Sorting
  • Stacks, Queues and Lists
  • Strings

Sample Pseudocode and Output Questions mock test questions

One question from each level, the way they appear in the test. A new set comes on the 1st of every month. Try it, then open the answer.

  1. EasyComplexity

    What is the time complexity of this pseudocode in terms of n?

    for (Integer i = 1; i <= n; i = i + 1)
        for (Integer j = 1; j <= n; j = j + 1)
            Print i * j
        end for
    end for
    • O(n)
    • O(n log n)
    • O(n^2)
    • O(log n)
    Show the answer

    Answer: O(n^2). For each of the n values of i the inner loop runs n times, so the body runs n * n times: O(n^2). Answering O(n) counts only the outer loop, and O(n log n) would need an inner loop that halves or doubles its counter; here j goes up by 1 all the way to n.

  2. MediumFunctions

    What does this pseudocode print? calls is a global variable.

    Integer calls = 0
    
    Integer g(Integer x)
        calls = calls + 1
        return x * x
    end function
    
    Integer s = g(2) + g(3) + g(g(2))
    Print s, calls
    • 29 3
    • 17 3
    • 29 4
    • 17 4
    Show the answer

    Answer: 29 4. g(2) = 4 and g(3) = 9. g(g(2)) calls g twice: g(2) = 4, then g(4) = 16. So s = 4 + 9 + 16 = 29 and g ran 4 times; it prints 29 4. Counting g(g(2)) as one call gives 29 3.

  3. HardRecursion

    Every entry of memo starts as -1. What does this pseudocode print?

    Integer memo[20]
    Integer calls = 0
    Integer f(Integer n)
        calls = calls + 1
        if (n < 2)
            return n
        end if
        if (memo[n] != -1)
            return memo[n]
        end if
        memo[n] = f(n - 1) + f(n - 2)
        return memo[n]
    end function
    Print f(10), calls
    • 55 11
    • 55 177
    • 55 10
    • 55 19
    Show the answer

    Answer: 55 19. Each f(n) for n >= 2 is computed once; its first call f(n - 1) fills memo, so its second call f(n - 2) returns at once. f(10) to f(2) is 9 computing calls, each making 2 calls, plus the first call: 19. f(10) = 55. Answering 177 is the call count without the memo.

Take the full Pseudocode and Output Questions mock test: 15 to 30 questions and 15 to 30 minutes, by level.

How is the Pseudocode and Output Questions mock test scored?

A question counts as right only when you pick exactly the right option, or all the right options where it says so; a question left blank counts as wrong. Your score is the share of the test's questions you got right (15 to 30, by level). The result also scores every topic, so you know what to revise before the interview.

  • 75% or more in a topica strength
  • 50% to 74%worth a revision
  • Under 50%a topic to work on

Pseudocode and Output Questions mock test: questions people ask

Is the Pseudocode and Output Questions mock test free?

Yes. The Pseudocode and Output Questions mock test is free. You need a free CoreHRx Jobs account to start it, so your score and the topics to work on are saved.

How many questions are in the Pseudocode and Output Questions mock test?

It depends on the level: Easy has 15 questions in 15 minutes, Medium has 20 questions in 20 minutes, Hard has 30 questions in 30 minutes. They are multiple-choice questions picked at random from a larger bank of Pseudocode and Output Questions questions at your level, so every attempt is different.

Which Pseudocode and Output Questions topics does the test cover?

The questions cover Loops and Tracing, Arrays, Bitwise Operations, Functions, Nested Loops, Number Logic, Recursion, Variables and Operators, Complexity, Conditions, Searching and Sorting, Stacks, Queues and Lists, Strings. Your result shows how you did in each topic.

Which level should I choose?

Easy: Variables, conditions and simple loops: trace the code and give the output. Medium: Nested loops, functions, arrays and strings, as most placement tests ask. Hard: Recursion, bitwise logic and multi-step traces, for top scores. Start with Easy and move up.

Can employers see my Pseudocode and Output Questions score?

Only your best Pseudocode and Output Questions score, and only when it is 60% or more. It shows on the job applications you send on CoreHRx. Lower scores stay private.

Can I take the Pseudocode and Output Questions mock test again?

Yes, up to 10 tests a day. Each attempt picks questions you have not seen recently first.

All mock tests