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.
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.
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.
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 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.
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 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.
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 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.
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.
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.
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.
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.
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.
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.
Yes, up to 10 tests a day. Each attempt picks questions you have not seen recently first.