Report Section
Programming Skills
sample
| 1497956784027
Test Taker Details
s
sample
Email Address: sample@mettl.com
Test-Taker ID: - 11582666
Last Name:
Not Filled
Date of birth:
Not Filled
Experience:
Not Filled
Country:
Not Filled
Performance Summary:
Values shown in above chart are percentages
Low (0 - 40)
Moderate (41 - 70)
High (71 - 100)
Recommendation
Moderately Recommended
The candidate has good understanding of basic concepts and excellent hands on experience in programming skills. He/she exhibits a high probability of understanding the task and applying conceptual knowledge to solve application level problems on the job.
Question-Wise Details
Note: Some sections/questions are hidden by your Administrator. This may change the questions/sections ordering.
Section 1
Coding Skills
5
question(s)
6m 22s
Time taken
30/40
Marks Scored
Representatives
In a school, the principal wants to meet some students of the school to look at the overall development including studies. Most of the teachers were sending the toppers of their classes but Mr. X thought of an idea to send the best bunch of students who did not have much difference in their marks so that he gains the reputation of a teacher who teaches well to the whole class and not just to a bunch of brilliant students.
Input:
input1: Number of students in the class.
input2 : Marks of each student.
input3: Number of representatives to be selected.
input1: Number of students in the class.
input2 : Marks of each student.
input3: Number of representatives to be selected.
Output:
Return the array containing the marks of k students which are selected.
Return the array containing the marks of k students which are selected.
Note: Return the array in increasing order.
Example 1:
Input: 10,{950,477,55,602,881,302,859,438,551,382},1
Output: {950}
Output: {950}
Example 2:
Input: 5,{12,99,22,21,6},2
Output: {21,22}
Explanation:
Example 1:
He has to select only one student so he will select the student with maximum marks.
Example 2:
Since he has to select two students, it is better to select students with marks 21 and 22.
Since he has to select two students, it is better to select students with marks 21 and 22.
/////
Compilation
Successful
Time Taken
1m
24s
Marks Scored
10
Out of
10
Language
PYTHON3
PYTHON3
00:00:00
/
00:00:00
Sample Test Case Timestamp
Graded Test Case Timestamp
Graded Test Case Code Compilation :
1
Successful
1
Attempt
Sample Test Case Code Compilation :
1
Successful
1
Attempt
Code complexity
:
0
Total no. of Testcase :
12
Total Passed :
12
Test Case
Marks
Cpu (ms)
Processing (ms)
Memory (KB)
Inputs
Expected output
Actual output
Error Message
default1
0
0
26
308
10, {950,477,55,602,881,302,859,438,551,382}, 1
{950}
{950}
NA
corner1
1
0
24
312
5, {1,2,3,4,5}, 5
{1,2,3,4,5}
{1,2,3,4,5}
NA
necessary
1
0
23
312
95, {8329,7040,362,598,3220,7203,8959,5575,2599,2071,7095,8795,9143,836,3937,9930,4949,2657,9963,8460,6263,9952,9138,6090,5856,127,6453,4625,2839,9551,7062,2417,9526,7743,7192,9214,5548,1991,8039,4289,3323,8013,8388,4475,1393,4714,6435,9102,930,547,3058,7384,3412,1449,8918,3926,4337,4493,4030,8457,6806,6992,9349,1,3149,3776,3322,8444,1159,8009,8725,4203,5465,9420,1771,1236,1281,8836,2501,9853,8368,6019,3227,6450,4948,4416,6994,2218,5188,3610,5695,6105,3468,5138,3876}, 14
{8329,8368,8388,8444,8457,8460,8725,8795,8836,8918,8959,9102,9138,9143}
{8329,8368,8388,8444,8457,8460,8725,8795,8836,8918,8959,9102,9138,9143}
NA
time2
1
0
24
312
85, {4894,1336,7426,7320,4224,3140,1232,2113,1410,2646,4167,2402,5167,4420,9495,3217,6052,4801,5880,6822,7237,4250,4151,5704,3534,6135,2048,4287,9631,2682,3297,8274,4898,4676,6487,9901,7709,2479,9778,1984,3295,2033,4687,389,5840,1421,4023,5320,4409,4061,6749,9561,6239,9381,2076,4339,7832,4479,444,5628,3436,6786,2868,8916,8982,9981,6312,5856,4178,3043,4114,1974,4283,5604,7627,4390,544,1557,3293,3903,7496,378,5152,9068,4413}, 28
{3217,3293,3295,3297,3436,3534,3903,4023,4061,4114,4151,4167,4178,4224,4250,4283,4287,4339,4390,4409,4413,4420,4479,4676,4687,4801,4894,4898}
{3217,3293,3295,3297,3436,3534,3903,4023,4061,4114,4151,4167,4178,4224,4250,4283,4287,4339,4390,4409,4413,4420,4479,4676,4687,4801,4894,4898}
NA
time1
1
0
24
308
98, {211,693,655,605,478,202,457,622,835,48,684,773,223,442,553,998,47,8,217,308,54,125,603,105,664,630,123,338,531,804,316,311,840,809,888,159,594,4,229,986,572,73,39,381,118,92,52,666,389,339,606,360,877,384,189,981,50,721,858,324,214,614,711,655,88,418,193,925,967,794,793,969,72,130,153,490,229,992,718,389,601,72,11,180,587,992,467,918,855,234,578,465,725,959,530,659,915,193}, 15
{47,48,50,52,54,72,72,73,88,92,105,118,123,125,130}
{47,48,50,52,54,72,72,73,88,92,105,118,123,125,130}
NA
necessary2
1
0
23
312
89, {501,732,788,495,521,712,160,384,637,50,435,493,837,558,223,593,860,552,937,260,44,346,361,429,397,539,185,311,448,65,396,161,141,940,365,254,728,816,964,514,896,310,532,924,182,633,564,722,340,378,376,165,817,152,881,232,396,436,889,385,244,489,934,91,384,562,994,560,495,590,766,64,818,657,216,991,960,810,994,328,136,235,129,745,274,757,442,931,881}, 22
{361,365,376,378,384,384,385,396,396,397,429,435,436,442,448,489,493,495,495,501,514,521}
{361,365,376,378,384,384,385,396,396,397,429,435,436,442,448,489,493,495,495,501,514,521}
NA
necessary
1
0
23
312
98, {643,510,118,545,294,889,849,494,633,272,204,818,73,402,800,560,649,577,174,977,521,599,62,317,224,461,444,130,890,290,832,582,412,229,528,657,716,754,589,35,584,707,43,147,604,170,186,941,415,532,261,132,593,57,178,559,45,954,103,922,613,18,534,671,400,508,118,593,288,984,481,570,20,70,47,777,884,35,438,568,237,622,817,861,537,669,563,449,937,981,102,324,209,325,948,264,483,554}, 17
{528,532,534,537,545,554,559,560,563,568,570,577,582,584,589,593,593}
{528,532,534,537,545,554,559,560,563,568,570,577,582,584,589,593,593}
NA
basic
1
0
24
308
38, {762,721,721,596,472,125,520,694,135,506,323,720,561,509,836,732,301,342,178,148,411,395,91,194,791,345,38,625,252,473,730,400,805,685,112,6,233,933}, 12
{596,625,685,694,720,721,721,730,732,762,791,805}
{596,625,685,694,720,721,721,730,732,762,791,805}
NA
basic
1
0
24
312
18, {318,795,800,998,445,765,835,930,909,430,790,55,746,321,452,160,296,288}, 5
{746,765,790,795,800}
{746,765,790,795,800}
NA
basic
1
0
24
308
26, {907,600,484,401,421,169,328,842,122,559,431,983,286,579,54,780,18,450,216,190,647,109,579,275,894,531}, 2
{579,579}
{579,579}
NA
basic
1
0
24
312
25, {881,69,830,367,436,886,27,273,164,997,997,561,517,792,548,674,716,119,473,249,130,963,928,224,472}, 6
{881,886,928,963,997,997}
{881,886,928,963,997,997}
NA
default
0
0
23
308
5, {12,99,22,21,6}, 2
{21,22}
{21,22}
NA
Monica And Flavors
Monica is the head chef at the Central Perk Cafe. She wants to serve her customers with as many types of dishes as possible, each having a different type of ingredient. Unfortunately, right now she has only N types of ingredients but Monica being how she was, can make new dishes using mixed ingredients with the following method:
Let us assume she initially has 4 flavors, she can make infinite dishes using these ingredients as follows:
Dish 1 would be prepared using ingredients which divide number of flavors, i.e. using (1,2,4).
Dish 2 would be prepared using the same procedure for each individual ingredient in Dish 1, i.e. using (1,1,2,1,2,4).
By following the given procedure, she can make infinite types of dishes.
She surprises her friends with a new type of food every other day.
Her friend Joey does not like surprises, so he wants you to calculate the ith dish that she would make using the given ingredients.
Input Specification:
input1: Number of initial ingredients.
input2: i th dish. |
Output Specification:
Return the sum of ingredients used on ith dish. |
Example 1:
input1: 4 input2: 2 |
Output: 11 |
Explanation:
Dish 1 would be made using (1,2,4).
Dish 2 would be made using (1,1,2,1,2,4).
Hence, sum of ingredients used in Dish 2 would be 1+1+2+1+2+4=11.
Example 2:
input1: 10 input2: 3 |
Output: 40 |
Explanation:
Dish 1 would be made using (1,2,5,10).
Dish 2 would be made using (1,1,2,1,5,1,2,5,10).
Dish 3 would be made using (1,1,1,2,1,1,5,1,1,2,1,5,1,2,5,10).
Hence, sum of ingredients used in Dish 3 would be 40.
////
Compilation
Successful
Time Taken
1m
30s
Marks Scored
10
Out of
10
Language
CPP
00:00:00
/
00:00:00
Sample Test Case Timestamp
Graded Test Case Timestamp
Graded Test Case Code Compilation :
1
Successful
1
Attempt
Sample Test Case Code Compilation :
1
Successful
1
Attempt
Code complexity
:
67
Total no. of Testcase :
12
Total Passed :
12
Test Case
Marks
Cpu (ms)
Processing (ms)
Memory (KB)
Inputs
Expected output
Actual output
Error Message
Default TestCase 1
0
0
2
4180
4, 2
11
11
NA
Basic TestCase 1
1
0
2
4180
1, 1
1
1
NA
Default TestCase 2
0
0
2
4180
10, 3
40
40
NA
Basic TestCase 2
1
0
3
4180
16, 10
1471
1471
NA
Basic TestCase 3
1
0
2
4180
10, 5
70
70
NA
Basic TestCase 4
1
0
2
0
15, 7
120
120
NA
Necessary TestCase 1
1
0
2
4180
10, 10
180
180
NA
Necessar TestCase 2
1
0
2
4180
20, 20
6350
6350
NA
Corner TestCase 1
1
0
3
4180
10, 0
10
10
NA
Corner TestCase 2
1
0
2
0
1, 10000
1
1
NA
Time Complexity TestCase 1
1
0
5
4180
50, 25
12825
12825
NA
Time Complexity TestCase 2
1
0
3
4180
99, 15
4524
4524
NA
Complete the following code to solve the given problem statement.
An Arithmetic Progression (AP) is a sequence of numbers such that the difference of any two successive members of the sequence is a constant.
A Geometric Progression (GP) is a sequence of numbers where each term after the first is found by multiplying the previous one by a fixed non-zero number called the common ratio.
Given three successive members of a sequence, you need to determine the type of the progression and the next successive member.
Input Specification:
Three integers,
input1
, input2, and
input3 that are successive members of a sequence.
|
Output Specification:
Return a string containing "AP_", if the sequence is an AP, or "GP_", if the given sequence is a GP and followed by the next member of the given sequence.
|
Example:
input1: 4
input2: 7
input3: 10
|
Output: AP_13
|
Explanation:
The 3 input numbers are in AP with a common difference of 3. The next number of the sequence will be 13.
!
Complete the following code to solve the given problem statement:
Every number has one special number, which it supports, chosen as shown.
It counts the number of ones in its own binary representation and adds this count to itself to obtain the value of the number it supports. That is if, j(m) means the number of ones in the binary representation of m, then m supports m+j(m).
For example, the number eight (1000 in binary) supports nine, whereas nine supports eleven. However, in this way not all the numbers get supported; some are left without support, and we call these numbers bleak. For example, since one supports two, two supports three and three supports five, there is no number less than four, which would support four, so four is bleak. Complete the program which, for a given number recognizes if it is bleak or supported by some number.
Input:
input1: It contains the number of test cases
input2: It is an array containing the number(n) to be checked
Output:
Return a string which for every checked number 'n' has BLEAK if 'n' is bleak or has SUPPORTED if for given 'n' there exists 'm' such that n = m + j(m).
Example:
Input: 2,{4,9}
Output: {BLEAK,SUPPORTED}
Economics Class
Rick recently got admission at a business school. The first class he attended was, Economics and it was a refresher of concepts like mean and median.
Mean is the average of all the numbers in a data and median is the middle value when all the numbers in the data are sorted in case the number of elements are odd or when the number of elements are even, it is the average of the two middle elements.
As homework, Rick was given a dataset with a large number of elements, he had to find a subset of that dataset which would give the largest value of mean-median. It was a tedious task and so, Rick developed a program to solve this problem.
Can you also solve the given problem?
Input Specification:
input1: The number of elements in the array(dataset). input2: The elements present in the array(datatset). |
Output Specification:
Return a subset of the original array(dataset) such that the value of mean-median is largest in it. |
Example 1:
input1: 4
input2: {1,2,3,4} |
Output: {1,2,4} |
Explanation:
If we take the subset {1,2,4}, we get mean as 7/3 and median as 2, so, the value of mean-median is 1/3.
Note that if we take any other subset, we will get lower value than this.
If we take the subset {1,2,4}, we get mean as 7/3 and median as 2, so, the value of mean-median is 1/3.
Note that if we take any other subset, we will get lower value than this.
For example, if we take the subset {1,3,4}, we will get the mean as 8/3 and median as 3 which make mean-median as -1/3.
Example 2:
input1: 5
input2: {1,2,2,3,3} |
Output: {2,2,3} |
Explanation:
Here again, if we take subset {2,2,3}, we will get mean as 7/3 and median as 2 and the difference is 1/3. If we had taken any other subset, we will get lower value than this.
//
Compilation
Successful
Time Taken
3m
12s
Marks Scored
10
Out of
10
Language
CPP
CPP
00:00:00
/
00:00:00
Sample Test Case Timestamp
Graded Test Case Timestamp
Graded Test Case Code Compilation :
1
Successful
3
Attempt
Sample Test Case Code Compilation :
1
Successful
3
Attempt
Code complexity
:
62
Total no. of Testcase :
12
Total Passed :
12
Test Case
Marks
Cpu (ms)
Processing (ms)
Memory (KB)
Inputs
Expected output
Actual output
Error Message
Default Testcase 1
0
0
3
276
4, {1,2,3,4}
{1,2,4}
{1,2,4}
NA
Default Testcase 2
0
0
2
276
5, {1,2,2,3,3}
{2,2,3}
{2,2,3}
NA
Basic Testcase 1
1
0
2
276
5, {7,7,5,8,6}
{5,6,8}
{5,6,8}
NA
Basic Testcase 2
1
0
2
276
9, {8,6,5,1,1,2,2,3,8}
{1,1,8}
{1,1,8}
NA
Basic Testcase 3
1
0
2
0
14, {3,10,10,1,2,3,9,4,5,10,3,2,9,6}
{1,2,2,10,10}
{1,2,2,10,10}
NA
Basic Testcase 4
1
0
10
276
20, {15,57,61,78,45,43,18,22,74,65,38,64,37,80,22,45,8,16,98,38}
{8,15,16,80,98}
{8,15,16,80,98}
NA
Necessary Testcase 1
1
0
2
276
36, {10357,7048,13109,3524,11861,12249,1866,14830,4592,6778,9693,14544,6338,8647,853,5325,11716,6727,11971,5200,923,2045,10216,9508,11839,11756,5415,1990,1076,14587,2409,11432,12986,518,6307,9846}
{518,853,923,1076,14544,14587,14830}
{518,853,923,1076,14544,14587,14830}
NA
Necessary Testcase 2
1
0
2
276
75, {9638,1906,643,4205,1891,6790,8616,5607,9144,6514,9451,8264,1534,6386,9883,7584,455,4187,4063,612,6954,345,8755,901,930,5620,3034,8521,9039,9605,5256,8677,7863,2250,9233,9753,9040,7848,5360,8183,4362,1162,2798,2247,3899,9033,6183,705,3219,245,1316,6524,589,6423,3776,7870,2042,6809,6390,7433,2766,7997,2461,628,6599,1693,6732,1990,9541,2091,172,254,9604,9322,2500}
{245,254,345,455,589,612,628,643,9451,9541,9604,9605,9638,9753,9883}
{245,254,345,455,589,612,628,643,9451,9541,9604,9605,9638,9753,9883}
NA
Corner Testcase 2
1
0
3
276
1, {10000}
{10000}
{10000}
NA
Corner Testcase 2
1
0
2
0
2, {1,2}
{1}
{1}
NA
Time Complexity Testcase 1
1
0
2
0
90, {14259,2804,9335,11734,7911,12033,9411,10343,4375,8052,6245,11491,2446,8404,6357,331,8209,5054,6151,3813,6181,6307,10758,8653,7278,13645,6696,5644,3443,11706,7734,2701,14509,8420,5786,7419,5452,6548,9113,1178,14599,358,12668,8396,113,10376,78,8321,429,12580,3485,6609,3887,14242,6614,11164,12887,13309,8159,7681,10014,892,1733,874,9311,7519,14645,6114,5418,8757,7291,11369,466,4958,4764,6930,333,4842,6603,7113,2421,10087,13721,12659,681,5334,174,4919,9994,8332}
{78,113,174,331,333,358,14242,14259,14509,14599,14645}
{78,113,174,331,333,358,14242,14259,14509,14599,14645}
NA
Time Complexity Testcase 2
1
0
2
276
97, {6461,10722,13552,2020,8146,13080,11701,14896,11266,13761,12172,7470,10585,12334,13509,527,3522,13740,644,6732,635,7763,1285,10480,9782,12945,9211,10759,2491,12886,2010,8951,14959,561,10971,8104,4993,14023,7999,7610,12783,11523,80,14720,8856,13588,246,12377,3679,7242,10461,4313,4,11745,14792,9786,1041,355,11896,3531,13240,5258,3834,4550,12170,6156,12654,2162,5178,12004,1124,9312,8526,1203,9031,2381,6142,629,6110,9820,7870,7922,5485,14225,11018,11628,362,12058,11982,12258,6941,1573,8867,2126,6123,6036,8281}
{355,362,527,561,629,635,644,14023,14225,14720,14792,14896,14959}
{355,362,527,561,629,635,644,14023,14225,14720,14792,14896,14959}
NA
Test Log
Test Log
20 Jun,2017
-
Started the test with Coding Skills
-
Went to Technical Skills of the test
-
Finished the test
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.