0% found this document useful (0 votes)
7 views

Problem Solving Test _ IT3

Uploaded by

Tonyy Mich
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Problem Solving Test _ IT3

Uploaded by

Tonyy Mich
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2/12/25, 12:32 PM Problem Solving Test | IT

Problem Solving Test | IT

Coding Problems

This challenge is designed to assess your problem-solving and coding skills.


You can choose to solve the problems using any of the following programming
languages: C#, Python, or Java.

The next part consists of

2 Medium-Level Coding Problems


2 Advanced-Level 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 …

The correctness of the output for the provided test cases.


Manual verification of your code using hidden test sets.

Good luck, and we look forward to reviewing your solutions!

13. What language will you use? *

C# (recommended)

Time Left: 0:28:10

https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 1/6
2/12/25, 12:32 PM Problem Solving Test | IT

14. Magic Potion Identifier

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:

A magical potion's power level is the exact cube of an integer.

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:

A single integer power, representing the power level of the potion.

Output Format:

A string: "YES" if the given power level is a magical potion, or "NO" otherwise.

Example Input Example Output

27 YES

30 NO

What will be the output for this power?

1 132651201231

Time Left: 0:28:10

https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 2/6
2/12/25, 12:32 PM Problem Solving Test | IT

15. Sneaky outcomes

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:

A single array of integers outcomes, where outcomes[i] represents the outcome


of a bet.
The length of the array is n + 2, where n is the number of unique outcomes
(ranging from 0 to n - 1).
The array contains exactly two outcomes that are repeated.

Output Format:
An array containing the two duplicate outcomes (in any order).

Example Input Example Output

[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]

What will be the output for this outcomes array?

[123456, 234567, 123347, 456789, 567890, 678901, 789012, 890123, 901234,

1 112233, 223344, 334455, 789012, 222234, 123347]

Time Left: 0:28:10

https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 3/6
2/12/25, 12:32 PM Problem Solving Test | IT

16. Reformat String to Alternating Case

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:

The alphabetical characters alternate between uppercase and lowercase.


Special characters, spaces, and numbers remain in their original positions, and their placement doesn
affect the alternating case order.

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.

Example Input Example Output

hello world! HeLlO wOrLd!

abc123! xyz AbC123! xYz

the_quick_brown_Fox!&jumps_over_the_lazy_dOg! ThE_qUiCk_BrOwN_fOx!&JuMpS_oVeR_tHe_LaZy_DoG

Hello, world! hElLo, WoRlD!

What will be the output for this string?

1 Za^B8g@E2jH*kWl!MoPqXr7YvT1c$Fs3Ud9IwZ&yX0pLkV6sHqN^tB4rA+oZ%gFj

Time Left: 0:28:10

https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 4/6
2/12/25, 12:32 PM Problem Solving Test | IT

17. Organizing Books into Identical Sets

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.

Return YES if such an arrangement is possible, or NO otherwise.

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.

Example Input Example Output

[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

What will be the output for this bookshelf array?

[1234567, 1234567, 2345678, 2345678, 3456789, 3456789, 1234567, 2345678,

1 3456789, 4567890, 4567890, 5678901, 5678901, 6789012, 6789012, 1234567,

2345678, 3456789, 4567890, 5678901, 4567890, 5678901]

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.

Alternatively, you can email your solution to [email protected].


Please include “Solving Coding Problems” in the subject line of your email.

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%

Time Left: 0:28:10

https://survey.alchemer.com/s3/8169047/Problem-Solving-Test-IT-2 6/6

You might also like