Problem Solving Test _ IT3
Problem Solving Test _ IT3
Coding Problems
You need to …
Provide a single output for the given input directly on the platform.
Upload your full solution as a .txt, .py, .java or .cs file within the
question interface (a link to the file in the cloud). Ensure your code runs
correctly and outputs the required result.
We will evaluate …
C# (recommended)
https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 1/6
2/12/25, 12:32 PM Problem Solving Test | IT
In the wizarding world, certain potions are considered "magical potions." A magical potion
is identified by its power level, which is a positive integer. To determine if a potion is
magical, it must satisfy this condition:
Your task is to determine if a potion's power level is magical. Return YES if the given
power level is a magical potion and NO otherwise.
Input Format:
Output Format:
A string: "YES" if the given power level is a magical potion, or "NO" otherwise.
27 YES
30 NO
1 132651201231
https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 2/6
2/12/25, 12:32 PM Problem Solving Test | IT
In the bustling world of Odds and Bets, there is a list called outcomes, where each
number represents a unique betting outcome ranging from 0 to n - 1. However, due to a
system error, two outcomes have been mistakenly added twice, making the list
longer than expected.
Your task is to identify the two duplicate outcomes, so the betting system can correct the
issue and run smoothly again. Return an array of size two, containing the two outcomes
(in any order).
Input Format:
Output Format:
An array containing the two duplicate outcomes (in any order).
[0, 3, 2, 1, 3, 2] [2, 3]
[7,1,5,4,3,4,6,0,9,5,8,2] [4, 5]
[0, 1, 2, 3, 4, 5, 5, 0] [0, 5]
https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 3/6
2/12/25, 12:32 PM Problem Solving Test | IT
In a digital text editor, there is a string s containing a mix of alphabetical characters, numbers, spaces, and
special characters. The editor needs the string to be reformatted such that:
Your task is to write a program that reformats the string as described above.
Input Format:
A single string s (1 ≤ length of s ≤ 1000), containing alphabetical characters (lowercase or uppercase),
spaces, numbers, and special characters.
Output Format:
A single string reformatted to alternate between uppercase and lowercase characters, while retaining the
positions of spaces, numbers, and special characters.
the_quick_brown_Fox!&jumps_over_the_lazy_dOg! ThE_qUiCk_BrOwN_fOx!&JuMpS_oVeR_tHe_LaZy_DoG
1 Za^B8g@E2jH*kWl!MoPqXr7YvT1c$Fs3Ud9IwZ&yX0pLkV6sHqN^tB4rA+oZ%gFj
https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 4/6
2/12/25, 12:32 PM Problem Solving Test | IT
You are given an array shelf, where each element shelf[i] represents the number of copies
of a particular book on a shelf.
Your task is to determine if it's possible to organize the books into one or more sets such
that:
Each set contains exactly x copies of the same book, where x > 1.
All books within a set are identical.
Input Format:
A single array shelf of integers, where 1 ≤ shelf.length ≤ 10^4 and 0 ≤ shelf[i] <
10^4.
Output Format:
A single string: "YES" if the books can be organized into valid sets, or "NO" otherwise.
[5, 5, 3, 3, 2, 2] YES
[1,2,3,4,4,3,2,1] YES
[1,1,1,2,2,2,3,3,3] YES
[1,2,3,4,4,3,2,1,4,4] YES
[1,1,1,2,2,2,3,3] NO
[7, 7, 7, 7, 8, 8, 8] NO
18. Your solution to the code problems (.txt, .py, .java or .cs)
Browse...
19. If you're having trouble attaching the file above, please provide a link to your
code on GitHub or to the file stored in the cloud. Please ensure that you have granted
access to the file.
Back Submit
Time Left: 0:28:10
https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 5/6
2/12/25, 12:32 PM Problem Solving Test | IT
83%
https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 6/6