You are on page 1of 21

PHP Developer Assessment

Chris | 19 Oct 2023

Lumina Datamatics Ltd | Chris Page 1 / 21


Test Taker Details

Overall Status: Completed Detailed Status: Test-taker Completed Test Finish Time: October 19, 2023 12:17:28 AM IST

Chris
C Email Address: chrisdsouza07@yahoo.in
Test-Taker ID: - 124718009

Profile Picture Snapshot: Identity Card Snapshot:

Last Name: Dsouza Date of birth: Oct 7, 1999

Contact No: 7507917668 Gender: Male

Country: India

Overall Assessment Score:

PHP Developer Assessment 40


68

Values shown in above chart are percentages

Unsatisfactory(0 - 30) Average(30 - 50) Good(50 - 80) Exceptional(80 - 100) Benchmark/Group Average

Strengths

OOPS Concepts

Strings

Lumina Datamatics Ltd | Chris Page 2 / 21


Areas Of Development

1. Functions 2. Arrays

3. Variables and Constants

Competency Wise Analysis:

PHP Basics 43

Advanced Topics 50

Hands-on Programming 90

Values shown in above chart are percentages

Unsatisfactory(0 - 30) Average(30 - 50) Good(50 - 80) Exceptional(80 - 100)

Sub-Skill Wise Analysis:

Arrays 17

OOPS Concepts 100

Functions 0

Variables and Constants 67

Control Structures 67

Strings 100

Values shown in above chart are percentages

Unsatisfactory(0 - 30) Average(30 - 50) Good(50 - 80) Exceptional(80 - 100)

Lumina Datamatics Ltd | Chris Page 3 / 21


Question-Wise Details

Note: Some sections/questions are hidden by your Administrator. This may change the questions/sections ordering.

Section 1 2 38m 11s


Hands-on Programming question(s) Time taken

Q.
Question 1 Compilation: Successful Time taken: 18m 30s
1

Lost in the Forest

A boy is lost in an infinitely long 1 dimensional jungle. The jungle is such that if the boy is standing at location N, then, after the next step he would be moved to
location (N/2) if N is even, and (3N + 1) if N is odd.

However, there is a magic door in the jungle that can take him to any location N he wants to go between location 1 and M (including both), but just once.

Find the location that the boy should go to such that he reaches the maximum number of locations in the forest.

Input Specification:

input1: The value of M

Output Specification:

Return the location where the boy should go first. If there are multiple answers, then return the largest one.

Example 1:

input1: 5

Output: 3

Explanation:
If he selects 3, then he can go to:
3->10->5->16->8->4->2->1.

Example 2:

input1: 10

Output: 9

Explanation:
If he selects 9, he can go to:
9->28->14->7-> 22 ->11 ->34 ->17 ->52-> 26-> 13-> 40-> 20 ->10 ->5-> 16 ->8-> 4-> 2-> 1

/////

MEDIUM Codelysis - Data Verified

Compilation Time Taken Language

Successful 18m 30s PHP

Lumina Datamatics Ltd | Chris Page 4 / 21


1 <?php PHP

2 // Read only region start


3
4 function lostInForest($input1)
5 {
6 // Expected return type : int
7 // Read only region end
8 // write code here.
9
10 $ans = 1;
11 $max_counter = 0;
12
13 for($i=2; $i<=$input1-1;$i++){
14
15 $counter = 0;
16 $temp = $i;
17
18 while($temp != 1){
19
20 if($temp%2 == 0){
21 $temp = $temp/2;
22 }else{
23 $temp = (3*$temp+1);
24 }
25 $counter++;
26
27 }
28
29 if($counter>=$max_counter){
30 $max_counter = $counter;
31 $ans = $i;
32 }
33
34 }
35
36 return $ans;
37
38 }
39 ?>

10

Lumina Datamatics Ltd | Chris Page 5 / 21


Sample Test Case Timestamp Graded Test Case Timestamp

Graded Test Case Code Compilation : 2 Successful 2 Attempt Code Score : 95


Sample Test Case Code Compilation : 6 Successful 6 Attempt

Total no. of Testcase : 10 Total Passed : 9


TEST CASE MARKS CPU (MS) PROCESSING MEMORY (KB) INPUTS EXPECTED OUTPUT ACTUAL ERROR
(MS) OUTPUT MESSAGE

Basic Testcase 4 1 0 179 103812 28 27 27 NA

Basic Testcase 3 1 0 182 103812 44 27 27 NA

Basic Testcase 2 1 0 176 103812 336 327 327 NA

Basic Testcase 1 1 0 224 103812 4847 3711 3711 NA

Necessary Testcase 2 1 0 252 103812 11448 10971 10971 NA

Necessary Testcase 1 1 0 379 103812 27769 26623 26623 NA

Corner Testcase 2 1 0 211 103812 1 1 1 NA

Corner Testcase 1 0 0 176 103812 97 97 73 NA

Time Complexity 1 0 1954 103812 28631 26623 26623 NA


Testcase 1

Time Complexity 1 0 1287 103812 16928 13255 13255 NA


Testcase 2

Lumina Datamatics Ltd | Chris Page 6 / 21


Q.
Question 2 Compilation: Successful Time taken: 19m 40s
2

Stocks

You want to buy a particular stock at its lowest price and sell it later at its highest price. Since the stock market is unpredictable, you steal the price plans of a
company for this stock for the next N days.

Find the best price you can get to buy this stock to achieve maximum profit.

Note: The initial price of the stock is 0.

Input Specification:

input1: N, number of days


input2: Array representing change in stock price for the day.

Output Specification:

Your function must return the best price to buy the stock at.

Example 1:

input1: 5
input2: {-39957,-17136,35466,21820,-26711}

Output: -57093

Explanation:
The best time to buy the stock will be on Day 2 when the price of the stock will be -57093.

Example 2:

input1: 9
input2: {-4527,-1579,-38732,-43669,-9287,-48068,-30293,-30867,18677}

Output: -207022

Explanation:
The best time to buy the stock will be on Day 8 when the price of the stock will be -207022.

EASY Codelysis - Data Verified

Compilation Time Taken Language

Successful 19m 40s PHP

1 <?php PHP

2 // Read only region start


3
4 function stocks($input1,$input2)
5 {
6 // Expected return type : int
7 // Read only region end
8 // write code here.

Lumina Datamatics Ltd | Chris Page 7 / 21


9
10 $ans = 0;
11 $temp = 0;
12
13 for($i=0; $i<$input1; $i++){
14
15 $temp += $input2[$i];
16
17 $ans = min($ans, $temp);
18
19 }
20
21 return $ans;
22
23 }
24 ?>

10

Sample Test Case Timestamp Graded Test Case Timestamp

Graded Test Case Code Compilation : 9 Successful 9 Attempt Code Score : 98


Sample Test Case Code Compilation : 10 Successful 10 Attempt

Total no. of Testcase : 10 Total Passed : 9


TEST CASE MARKS CPU (MS) PROCESSING MEMORY (KB) INPUTS EXPECTED OUTPUT ACTUAL ERROR
(MS) OUTPUT MESSAGE

Basic Testcase 1 0 0 244 103812 71, 25557 0 NA


{25557,39196
,33725,13606,
-3076,-36651,
-13271,-1790
1,15350,-114
2,39114,-402
29,8960,7542,
37081,27612,
45093,-32557
,21539,11119,

Lumina Datamatics Ltd | Chris Page 8 / 21


-45359,3905,-
22269,2240,2
2133,-43194,
31729,-15153
,48293,-1967,
-4833,-18558,
21823,-5037,-
17807,39620,
40675,29162,
13492,11565,
28670,4704,-
7838,-4891,-1
7832,-42691,-
3769,40676,-
34794,48438,
35664,43696,
49870,-36843
,-45344,-3659
,45390,-4603
4,8317,30233,
27290,-1931,-
19612,8758,-
16726,25151,
-48033,4328,-
38773,37768,
-3615}

Basic Testcase 2 1 0 184 102404 95, -188430 -188430 NA


{37367,-2228
5,8992,-8224,
2732,37593,2
4232,12099,-
43787,24098,
24106,-35737
,-1530,-17054
,13013,15901,
-35871,-2140
3,47302,-354
4,-2430,-2797
0,-43725,-400
00,5023,5485,
44420,21771,
19946,48415,
19043,47206,
48257,-7026,
46478,-37356
,32041,-3934,
25763,-49556
,-49041,-2388
6,-38960,-202
52,-35629,-13
193,-23302,-1
9046,35022,1
8489,-45534,-
41162,-39839
,36361,40705,

Lumina Datamatics Ltd | Chris Page 9 / 21


5037,38141,-
33417,-46092
,-39349,-3205
4,-46942,326
11,-26606,40
301,-10209,-3
5640,-24795,
13246,10379,
6671,-17147,
4963,16802,2
9526,-6238,-1
525,37149,13
225,-2632,-37
019,-49474,1
8227,34110,-
2837,-44775,
21656,12092,
29235,-21799
,23045,6010,-
21364,-23619
,-34716}

Basic Testcase 3 1 0 213 103812 80, -128068 -128068 NA


{49177,16234
,-15740,-4640
5,8541,11838,
-21912,42100
,13427,49338,
-7254,-14893,
4331,-25298,-
11054,4190,-
33187,-10248
,-43286,-3455
8,24147,4015
5,-48829,341
13,4266,3781
2,-42889,-413
06,7951,-120
4,42918,2932
1,-41661,-253
68,10764,201
9,23407,4661
8,-45615,-106
76,-43104,31
171,13566,-3
5612,46575,3
2656,-42834,
21232,4838,-
27812,-10380
,-42373,-2954
8,9566,43106,
-2618,14540,-
37151,15851,
7421,24954,8
047,-31517,2
1678,-2671,3

Lumina Datamatics Ltd | Chris Page 10 / 21


8080,-39599,
29729,-34734
,-33363,1695
6,21143,-166
82,-6920,-440
82,-29461,48
155,-37079,3
9278,-33926}

Basic Testcase 4 1 0 225 102340 95, -800673 -800673 NA


{-39013,-4524
7,-40473,317
65,14349,-13
918,15591,-4
4251,-45710,-
9070,-38614,-
10401,-6159,-
33543,-35122
,-23873,-3050
4,907,-17523,
34428,-32924
,24633,46066,
8225,3509,-1
3510,-30198,-
4382,-20395,
49178,-33206
,-4915,-15227
,-27358,-2495
0,25043,1477
2,-2830,-3334
5,28203,-371
67,2581,-175
56,49028,287
78,-21494,37
634,-38490,-4
1698,25888,2
4774,-43583,-
19257,-17230
,29155,6078,7
291,-24534,-3
8558,-45809,-
34391,-36964
,20706,-3003
8,-45644,-136
32,-27206,60
6,17285,3924
8,27242,-242
16,-21976,-30
643,-17690,4
7317,-2166,-1
1307,48980,-
48868,12989,
-11655,32882
,-48365,3375
9,-6720,-2950
1,-12713,351

Lumina Datamatics Ltd | Chris Page 11 / 21


1,-23213,-330
45,-29863,12
767,-43988,1
7298}

Necessary Testcase 1 1 0 117 103812 88, -69874 -69874 NA


{-27203,-6728
,34795,9935,2
0157,-39673,-
46906,-14251
,11504,16170,
46378,10443,
-298,41861,4
0811,-35584,-
27820,-4291,-
8112,19765,-
6347,-7242,4
0962,-17663,-
13600,35169,
-1155,16190,-
32390,-441,7
022,-39152,1
1208,-29347,
39335,48067,
22490,47722,
-21075,-1656
5,-31230,-260
09,34970,336
67,10981,243
55,18102,178
8,28118,-406
1,43576,-284
41,-8966,-440
26,15205,147
75,42,-11917,
7033,-15391,
22617,1673,-
43422,18246,
-4969,34657,-
14813,-28518
,-30695,-4494
,37528,14074,
-43621,45635
,8703,7743,31
162,14464,-2
4967,19839,-
3830,40902,3
2034,10397,-
47943,20483,
-13256,24884
}

NecessaryTestcase 2 1 0 205 103812 74, -51235 -51235 NA


{-31745,3179
1,10063,-118
94,9613,3457

Lumina Datamatics Ltd | Chris Page 12 / 21


2,6949,15750,
-47633,41410
,15019,14935,
-10788,33617
,16743,-4729
4,-25136,686
4,17651,-112
49,36582,-39
117,35858,-4
3551,-14358,-
16152,11536,
-46886,-4438
5,49940,3089
8,42964,3764
2,-31337,362
1,-28909,138
56,-1726,754
8,22314,-252
93,29049,384
8,18307,-681
6,-29795,-143
0,42067,-206
5,49638,-212
70,-29652,13
25,29178,176
06,23471,-23
559,-15652,-4
7376,31379,-
20375,-43338
,8801,-17118,
-47942,-703,-
18772,26007,
21324,-31884
,47813,-4763
7,34733,5561
}

Corner Testcase 1 1 0 181 103812 89, -81667 -81667 NA


{-19935,-1333
8,-14670,-337
24,15421,881
6,44452,4575
1,9582,-3335
0,-16341,357
79,-4927,253
73,-7324,409
95,-22452,18
018,43415,-2
5911,-36841,
45361,30754,
30561,-15115
,32526,24227,
-9962,27269,
322,-45226,8
727,47724,-4
9679,-32094,-

Lumina Datamatics Ltd | Chris Page 13 / 21


5886,5222,48
826,19818,-3
8807,-19356,
459,-43626,2
947,-8260,-29
8,-20963,-176
55,-48601,33
38,-2468,-308
62,11617,238
3,3655,32168,
-30808,-3034,
-1785,-38203,
20280,11651,
44673,31166,
9086,47585,-
6379,-3116,-2
6656,24375,-
41901,7005,1
3088,-18161,
45135,-38702
,30521,49656,
10788,-42749
,46178,-2127
8,46689,2792
2,-27698,-414
62,35588,164
30,6748}

Corner Testcase 2 1 0 348 103812 74, -120056 -120056 NA


{-8125,25181,
-39402,44446
,21229,-1693
9,-1692,-4060
1,-49556,-810
9,-31349,402
71,-15417,77
7,-15040,292
84,-3416,291
73,-47174,43
074,-10264,1
3486,25650,-
11679,-32224
,-18795,3691
8,26961,1527
4,-49297,-213
50,-25509,-25
842,48332,32
192,33490,-3
413,-621,484
40,16425,293
3,-44483,252
52,3939,-260
57,45551,-24
143,22623,21
215,-42963,3
2686,-15720,

Lumina Datamatics Ltd | Chris Page 14 / 21


38260,-24413
,-10296,4086
4,45591,-676
9,-39842,856
7,-22712,-333
60,-3104,-205
50,-33887,-41
26,-10338,-32
240,41716,-3
015,-31616,4
5294,-8558,-4
1884}

Time Complexity 1 0 285 103812 90, -297282 -297282 NA


Testcase 1 {10062,-3927
2,-22646,-496
77,-7705,146
94,111,42709,
-34634,8628,
29992,-45787
,739,-45205,4
4188,42870,-
29312,49700,
-22272,4948,-
21990,47162,
21740,-43176
,-46301,9185,
16553,-11006
,-18467,8477,
-38690,-4184
8,-24891,-220
7,25206,-290
57,-3141,-193
10,43367,125
86,29065,163
66,-20086,42
295,16565,-2
9794,43546,1
1494,-10150,
43131,-26859
,37901,35160,
-47795,10385
,-8635,-30089
,-7920,9175,-
34632,-44283
,36730,33548,
-4853,-25492,
10335,-44901
,-42061,-1303
3,-14241,-173
02,35329,-10
486,-34362,4
7999,13192,-
4325,-26091,
8764,-46234,-
27118,12028,

Lumina Datamatics Ltd | Chris Page 15 / 21


6191,-37583,-
24479,37796,
44742,-38964
,21448,-3011
2}

Time Complexity 1 0 226 103812 96, -145158 -145158 NA


Testcase 2 {-25368,4517
1,-48449,321
64,-8777,-804
0,-28750,-309
41,26426,165
56,7720,2438
5,-494,-4121,
16391,-5646,
46284,32589,
33142,-18361
,-18073,1008
2,-46595,-491
61,-27677,-36
851,-37872,-2
1777,33869,-
42667,-10317
,44509,12159,
20114,32349,
1871,6410,29
034,-9796,-20
404,11253,18
488,5984,-11
624,-30045,4
9010,2143,-9
341,-3246,-34
319,384,2518
0,4287,32592,
19534,-34724
,24362,-2942
0,-43950,414
10,17398,-11
885,9581,339
43,19778,491
18,34272,-38
339,30908,63
1,-48159,410
8,-45549,368
04,-14825,15
563,-37011,-3
406,46956,31
294,39694,21
651,-7615,24
82,36978,-27
462,-3995,48
245,18211,-1
9815,-48589,-
32924,14723,
49113,-36429
,10193}

Lumina Datamatics Ltd | Chris Page 16 / 21


Lumina Datamatics Ltd | Chris Page 17 / 21
Test Log

18th Oct 2023

11:19 PM Started the test with Hands-on Programming

11:19 PM Candidate gave us right to the following feeds


- camera : HP TrueVision HD Camera (05c8:03d2)
- microphone : Default - Headset Microphone (Realtek(R) Audio)

11:23 PM Went to PHP Basics of the test

11:37 PM Went to Advanced Topics of the test

11:40 PM Went to PHP Basics of the test

11:42 PM Went to Hands-on Programming of the test

11:50 PM Candidate Looking Away from Screen

11:57 PM Candidate Looking Away from Screen

11:58 PM Candidate Face Partially Visible

11:59 PM Candidate Face Partially Visible

19th Oct 2023

12:05 AM Candidate Looking Away from Screen

12:05 AM Candidate Face Partially Visible

12:06 AM Candidate Face Partially Visible

12:07 AM Candidate Looking Away from Screen

12:11 AM Candidate Face Partially Visible

12:16 AM Went to PHP Basics of the test

12:17 AM Went to Advanced Topics of the test

12:17 AM Finished the test

Profile Picture Snapshot Identity Card Snapshot

Lumina Datamatics Ltd | Chris Page 18 / 21


Images of Test-Taker

11:19 PM 11:50 PM : Candidate Looking Away from Screen

11:57 PM : Candidate Looking Away from Screen 11:58 PM : Candidate Face Partially Visible

11:59 PM : Candidate Face Partially Visible 12:00 AM : Candidate Face Partially Visible

12:05 AM : Candidate Looking Away from Screen 12:05 AM : Candidate Face Partially Visible

12:05 AM : Candidate Face Partially Visible 12:06 AM : Candidate Face Partially Visible

Lumina Datamatics Ltd | Chris Page 19 / 21


12:07 AM : Candidate Looking Away from Screen 12:11 AM : Candidate Face Partially Visible

Lumina Datamatics Ltd | Chris Page 20 / 21


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.

Lumina Datamatics Ltd | Chris Page 21 / 21

You might also like