Report Section

PHP Developer Assessment
Demo
| 1731052508000
Test Taker Details
D
Demo
Email Address: Demoo@mercer.com
Test-Taker ID: - 139957055
Last Name:
Sample
Gender Identity:
Male
Country of Residence:
India
Overall Assessment Score:
Values shown in above chart are percentages
Unsatisfactory (0 - 30)
Average (30 - 50)
Good (50 - 80)
Exceptional (80 - 100)
Benchmark/Group Average
Strengths
PHP - General - Analysis
PHP - OOPS - Application
Areas of Development
Codelysis Skills
PHP - Variables and Constants - Application
PHP - Arrays - Application
Competency Wise Analysis:
Values shown in above chart are percentages
Unsatisfactory (0 - 30)
Average (30 - 50)
Good (50 - 80)
Exceptional (80 - 100)
Sub-Skill Wise Analysis:
Values shown in above chart are percentages
Unsatisfactory (0 - 30)
Average (30 - 50)
Good (50 - 80)
Exceptional (80 - 100)
Question-Wise Details
Note: Some sections/questions are hidden by your Administrator. This may change the questions/sections ordering.
Section 1
Hands-on Programming
2
question(s)
3s
Time taken
0/20
Marks Scored
Question
Pass the Ball
Assume that a group of
N players are playing a game. In this game, a player must pass the ball to another player. A player
P holds the ball at the beginning of the game. A maximum of
X moves are allowed while passing the ball such that it ends up with the same player who started the game. Given below is the condition that must be followed by all the players while passing the ball:
- A player K1 can pass the ball to another player K2 if K1 divides K2 or K2 divides K1.
Your task is to find and return an integer value representing the number of possible ways to complete the game.
Note: A game is considered as "complete" if the ball ends up with the player who started it.
Input Specification:
input1: An integer value N, representing the number of players.
input2: An integer value P, representing the player who starts the game.
input3: An integer value X, representing the maximum number of moves allowed to pass the ball.
|
Output Specification:
Return an integer value representing the number of possible ways to complete the game.
|
Example 1:
input1: 3
input2: 2 input3: 2 |
Output: 1
|
Explanation:
There are 3 players in the game and, initially, the 2
nd player has the ball. A maximum of 2 moves are allowed, so the game can be completed in the following way:
- 2->1->2 Here, player 2 can pass the ball to player 1 as 1 divides 2. For the same reason, player 1 can pass the ball to player 2.
Since there is only 1 possible way to complete the game,
1 is returned as the output.
Example 2:
input1: 3
input2: 2 input3: 4 |
Output: 3
|
Explanation:
There are 3 players in the game and, initially, the 2
nd player has the ball.
There is a maximum of 4 moves allowed, so the game can be completed in the following ways:
- 2->1->2
- 2->1->3->1->2
- 2->1->2->1->2
Therefore,
3 is returned as the output.
Question
Profit Development
Tyler Durden is a salesperson and is assigned a task to travel to sell soaps. He must travel to different countries with
S states each. His manager has also provided him with an integer array
A, of length
N. Array 'A' represents a rating list which shows the past sales in a certain state. Below are a few rules for him to follow to increase the efficiency of his travel :-
- Tyler should begin his travel from the state which has the lowest rating.
- When he starts his travel in a country, he should visit all the states in that country before going to a different country.
Your task is to help Tyler plan his travel route and return an integer value representing the country and the rating of the state Tyler will be travelling to in month
M based on the rating list.
Note:
- The rating list contains data for all the states together, so the first S ratings are for country 1, the next S ratings are for country 2 and so on.
- The month count starts from 1 and if two or more countries have the same lowest rating then choose the country whose state has the second lowest rating.
Input Specification
input1 : An integer value N, representing the length of the rating list.
input2 : An integer value S, representing the number of states in a country.
input3 : An integer value M, representing the month number.
input4 : An integer array A, representing the rating list.
|
Output Specification
Output1 : Return the country Tyler will be travelling to in month M based on the rating list.
Output2 : Return the state Tyler will be travelling to in month M based on the rating list.
|
Example 1:
input1 : 6 input2 : 3 input3 : 6 input4 : {2,1,9,3,1,4} |
Output1 : 2
Output2 : 4
|
Explanation:
There are 6 states where Tyler needs to travel, and each country has 3 states. Based on the rating list, the route of his travel will be:
- Country 1 -> Country 2 (Since the lowest rating is same in both the countries, we look at the second lowest rating and thus, Tyler will start his travel with Country 1)
- Country 1: State with rating 1-> State with rating 2 -> State with rating 9
- Country 2: State with rating 1-> State with rating 3 -> State with rating 4
Using this route, Tyler will be in Country 2 and State with rating 4 during the 6
th month. Therefore,
2 and
4 will be returned as output1 and output2, respectively.
Example 2:
input1 : 12 input2 : 3 input3 : 7 input4 : {4,5,7,9,3,2,5,1,3,2,4,1} |
Output1 : 2 Output2 : 2 |
Explanation:
There are 12 states which Tyler needs to travel to, and each country has 3 states. Based on the rating list, the route of his travel will be:
- Country 4-> Country 3-> Country 2-> Country 1 (Since the lowest rating is same in Country 4 and Country 3, we look at the second lowest rating and thus, Tyler will start his travel with Country 4)
- Country 4: State with rating 1-> State with rating 2-> State with rating 4
- Country 3: State with rating 1-> State with rating 3-> State with rating 5
- Country 2: State with rating 2-> State with rating 3-> State with rating 9
- Country 1: State with rating 4-> State with rating 5-> State with rating 7
Using this route, Tyler will be in Country 2 and State with rating 2 during the 7
th month. Therefore,
2 and
2 will be returned as output1 and output2, respectively.
Test Log
Test Log
08 Nov,2024
About the Report
This Report is generated electronically on the basis of the inputs received from the assessment takers. This Report including the AI flags that are generated in case of availing of proctoring services, should not be solely used/relied on for making any business, selection, entrance, or employment-related decisions. Mettl accepts no liability from the use of or any action taken or refrained from or for any and all business decisions taken as a result of or reliance upon anything, including, without limitation, information, advice, or AI flags contained in this Report or sources of information used or referred to in this Report.