0% found this document useful (0 votes)
94 views24 pages

Vaibhav Jakhar AssessmentCenterReport 163

The document presents a detailed performance report for candidate Vaibhav Jakhar, who took various assessments in Software Development, Data Science, Machine Learning, and Automata on May 10, 2025. The scores indicate strengths in Automata (89/100) and weaknesses in Software Development (56/100) and Data Science (40/100). The report includes insights on performance, response analysis, and suggestions for learning resources to improve skills.

Uploaded by

FUNLANIOUS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views24 pages

Vaibhav Jakhar AssessmentCenterReport 163

The document presents a detailed performance report for candidate Vaibhav Jakhar, who took various assessments in Software Development, Data Science, Machine Learning, and Automata on May 10, 2025. The scores indicate strengths in Automata (89/100) and weaknesses in Software Development (56/100) and Data Science (40/100). The report includes insights on performance, response analysis, and suggestions for learning resources to improve skills.

Uploaded by

FUNLANIOUS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Vaibhav Jakhar

Test ID: 450011869000949 7037783955 [email protected]

Test Date: May 10, 2025

Software Development (Full Data Science Machine Learning Automata


Stack L1)

56 /100 40 /100 42 /100 89 /100

Automata Fix

72 /100

Software Development (Full Stack L1) 56 / 100

RESTful Web Services GIT CSS3

33 / 100 67 / 100 33 / 100

ReactJS HTML5 Logical Ability

0 / 100 0 / 100 100 / 100

Data Science 40 / 100

ML algorithms and implementation Probability and statistics Setting up ML experiments

50 / 100 67 / 100 0 / 100

Machine Learning 42 / 100

Data Analysis and Statistics Predictive Modelling Advanced Machine Learning

25 / 100 40 / 100 67 / 100

© 2025 SHL and/or its affiliates. All rights reserved.. 1/24


Automata 89 / 100

Programming Ability Programming Practices Functional Correctness

90 / 100 88 / 100 75 / 100

Automata Fix 72 / 100

Logical Error Code Reuse Syntactical Error

75 / 100 50 / 100 100 / 100

© 2025 SHL and/or its affiliates. All rights reserved.. 2/24


1 Introduction

About the Report

This report provides a detailed analysis of the candidate's performance on different assessments. The tests for this
job role were decided based on job analysis, O*Net taxonomy mapping and/or criterion validity studies. The
candidate’s responses to these tests help construct a profile that reflects her/his likely performance level and
achievement potential in the job role

This report has the following sections:

The Summary section provides an overall snapshot of the candidate’s performance. It includes a graphical
representation of the test scores and the subsection scores.

The Insights section provides detailed feedback on the candidate’s performance in each of the tests. The descriptive
feedback includes the competency definitions, the topics covered in the test, and a note on the level of the
candidate’s performance.

The Response section captures the response provided by the candidate. This section includes only those tests that
require a subjective input from the candidate and are scored based on artificial intelligence and machine learning.

The Learning Resources section provides online and offline resources to improve the candidate's knowledge, abilities,
and skills in the different areas on which s/he was evaluated.

Score Interpretation

All the test scores are on a scale of 0-100. All the tests except personality and behavioural evaluation provide
absolute scores. The personality and behavioural tests provide a norm-referenced score and hence, are percentile
scores. Throughout the report, the colour codes used are as follows:

Scores between 67 and 100

Scores between 33 and 67

Scores between 0 and 33

© 2025 SHL and/or its affiliates. All rights reserved.. 3/24


2 Insights

Data Science 40 / 100

© 2025 SHL and/or its affiliates. All rights reserved.. 4/24


3 Response

Automata 89 / 100 Code Replay

Question 1 (Language: C++)

A company called Digicomparts manufactures 52 types of unique products for laptop and desktop computers. It
manufactures 10 types of laptop products and 42 types of desktop products. Each product manufactured by the
company has a unique productID from a-z and A-Z. The laptop products have productIDs (a, i, e, o, u, A, I, E, O, U)
while the rest of the productIDs are assigned to the desktop products. The company manager wants to find the sales
data for the desktop products.

Write an algorithm to help the manager find the productIDs of the desktop products.

Scores

Programming Ability Programming Practices

100 / 100 100 / 100


Completely correct. A correct implementation of the problem High readability, high on program structure. The source code is
using the right control-structures and data dependencies. readable and does not consist of any significant
redundant/improper coding constructs.

Functional Correctness

100 / 100
Functionally correct source code. Passes all the test cases in the
test suite for a given problem.

Final Code Submitted Compilation Status: Pass Code Analysis

1 // Header Files Average-case Time Complexity


2 #include<iostream>
3 #include<string>
4 #include<vector> Candidate code: O(N logN)

5 #include<bits/stdc++.h> Best case code: O(N)


6 using namespace std;
7 *N represents number of products.

8
9 /* Errors/Warnings
10 * productID representing the product IDs of the sales.
11 */ There are no errors in the candidate's code.
12 int calculateDesktopProductIDs (vector<char> pro)
13 { Structural Vulnerabilites and Errors

14 int ans = 0 ;
15 int answer = 0 ;

© 2025 SHL and/or its affiliates. All rights reserved.. 5/24


16 int n = pro.size();
17 Readability & Language Best Practices

18 for(int i=0 ; i<n ; i++){ Line 16: Variables are given very short name.

19 if(pro[i] == 'a' || pro[i] == 'e' || pro[i] == 'i' || pro[i] == 'o' || pro


[i] == 'u' ||
20 pro[i] == 'A' || pro[i] == 'E' || pro[i] == 'I' || pro[i] == 'O' || pr
o[i] == 'U' ){
21 ans++;
22 }
23 }
24 answer = n - ans ;
25 return answer;
26 }
27
28 int main()
29 {
30
31 //input for productID
32 int productID_size;
33 cin >> productID_size;
34 vector<char> productID;
35 for ( int idx = 0; idx < productID_size; idx++ )
36 {
37 char temp;
38 cin >> temp;
39 productID.push_back(temp);
40 }
41
42 int result = calculateDesktopProductIDs(productID);
43 cout << result;
44
45
46 return 0;
47 }
48
Test Case Execution Passed TC: 100%

Total score
100% 100% 100%
15/15 Basic(10/10) Advance(4/4) Edge(1/1)

© 2025 SHL and/or its affiliates. All rights reserved.. 6/24


Compilation Statistics

3 2 1 0 0 0

Total attempts Successful Compilation errors Sample failed Timed out Runtime errors

Response time: 00:06:57

Average time taken between two compile attempts: 00:02:19

Average test case pass percentage per compile: 33.33%

Average-case Time Complexity

Average Case Time Complexity is the order of performance of the algorithm given a random set of inputs. This complexity is measured
here using the Big-O asymptotic notation. This is the complexity detected by empirically fitting a curve to the run-time for different input
sizes to the given code. It has been benchmarked across problems.

Test Case Execution

There are three types of test-cases for every coding problem:

Basic: The basic test-cases demonstrate the primary logic of the problem. They include the most common and obvious cases that an
average candidate would consider while coding. They do not include those cases that need extra checks to be placed in the logic.

Advanced: The advanced test-cases contain pathological input conditions that would attempt to break the codes which have
incorrect/semi-correct implementations of the correct logic or incorrect/semi-correct formulation of the logic.

Edge: The edge test-cases specifically confirm whether the code runs successfully even under extreme conditions of the domain of
inputs and that all possible cases are covered by the code

Question 2 (Language: C++)

In a car racing game, the participating cars must be registered online prior to the game. A car is assigned a
registration number that is stored in a database. The registration number consists of digits from 0-9. The registration
number can be positive or negative. A negative registration number denotes that the car is already registered online
whereas a positive registration number denotes that the car is a newly registered car. Before the game starts, the
system automatically assigns a track number to each car. The track number is the smallest permutation of the car
registration number and never starts with zero.

Write an algorithm to generate the track number.

© 2025 SHL and/or its affiliates. All rights reserved.. 7/24


Scores

Programming Ability Programming Practices

80 / 100 75 / 100
Correct with inadvertent errors. Correct control structures and Low readability, high on program structure. The source code does
critical data dependencies incorporated. Some inadvertent errors not follow best practices in its formatting and may contain a few
make the code fail test cases. redundant/improper coding constructs.

Functional Correctness

50 / 100
Correct basic functionality with partially correct advanced
functionality. Passes all the basic test cases in the test suite and a
percentage of the advanced test cases.

Final Code Submitted Compilation Status: Pass Code Analysis

1 // Header Files Average-case Time Complexity


2 #include<iostream>
3 #include<string>
4 #include<vector> Candidate code: Complexity is reported only when the code
is correct and it passes all the basic and advanced test
5 #include <bits/stdc++.h> cases.
6 using namespace std;
7 Best case code:

8
9 /* *N represents length of given number

10 * The input consists of an integer- num, representing the car regis


tration number. Errors/Warnings
11 */
12 int smallestPermutation (int num) There are no errors in the candidate's code.
13 {
14 Structural Vulnerabilites and Errors

15 vector<int> arr ;
16 Readability & Language Best Practices

17 int m = num; Line 17,20,33...: Variables are given very short

18 name.

19 while(m > 0){


20 int k ;
21 k = m%10 ;
22 arr.push_back(k);
23 m = m/10 ;
24 }
25
26 sort(arr.begin(), arr.end());
27
28 if(num<0){
29 reverse(arr.begin() , arr.end());
30 }

© 2025 SHL and/or its affiliates. All rights reserved.. 8/24


31
32
33 int n = arr.size() ;
34 int ans = 0 ;
35 bool a = false ;
36 for(int i=0 ; i<n ; i++){
37 if(arr[i] == 0) continue ;
38
39 else if (!a && arr[i] !=0 ){
40 a=true ;
41 ans = arr[i]*pow(10,i);
42 }
43
44 else {
45 ans = ans*10 + arr[i];
46 }
47 }
48
49
50 int as = 0 ;
51 for(int i=0 ; i<n ; i++){
52 if(arr[i] == 0) {
53 as = as * (pow(10 , n-i+1));
54 break;
55 }
56 else {
57 as = as*10 + arr[i];
58 }
59 }
60
61 if(num > 0) return ans ;
62
63 else return num ;
64
65
66 }
67
68 int main()
69 {
70 //input for num
71 int num;
72 cin >> num;
73
74
75 int result = smallestPermutation(num);
76 cout << result;
77
78
79 return 0;
80 }
© 2025 SHL and/or its affiliates. All rights reserved.. 9/24
81
Test Case Execution Passed TC: 70%

Total score
100% 25% 100%
7/10 Basic(4/4) Advance(1/4) Edge(2/2)

Compilation Statistics

18 16 2 0 2 2

Total attempts Successful Compilation errors Sample failed Timed out Runtime errors

Response time: 00:37:22

Average time taken between two compile attempts: 00:02:05

Average test case pass percentage per compile: 28.33%

Average-case Time Complexity

Average Case Time Complexity is the order of performance of the algorithm given a random set of inputs. This complexity is measured
here using the Big-O asymptotic notation. This is the complexity detected by empirically fitting a curve to the run-time for different input
sizes to the given code. It has been benchmarked across problems.

Test Case Execution

There are three types of test-cases for every coding problem:

Basic: The basic test-cases demonstrate the primary logic of the problem. They include the most common and obvious cases that an
average candidate would consider while coding. They do not include those cases that need extra checks to be placed in the logic.

Advanced: The advanced test-cases contain pathological input conditions that would attempt to break the codes which have
incorrect/semi-correct implementations of the correct logic or incorrect/semi-correct formulation of the logic.

Edge: The edge test-cases specifically confirm whether the code runs successfully even under extreme conditions of the domain of
inputs and that all possible cases are covered by the code

Automata Fix 72 / 100 Code Replay

Question 1 (Language: C++)

The function/method countDigits return an integer representing the remainder when the given number is divided by
the number of digits in it.
The function/methodcountDigits accepts an argument - num, an integer representing the given number.

© 2025 SHL and/or its affiliates. All rights reserved.. 10/24


The function/method countDigits compiles successfully but fails to print the desired result for some test cases due to
logical errors. Your task is to fix the code so that it passes all the test cases.

Scores

Final Code Submitted Compilation Status: Pass Code Analysis

1 #include <bits/stdc++.h> Average-case Time Complexity


2 using namespace std;
3 int countDigits(int num)
4{ Candidate code: Complexity is reported only when the code
is correct and it passes all the basic and advanced test
5 int count =0; cases.
6 while(num>0){
7 num=num/10; Best case code:

8 count++;
9 } *N represents

10 return (num%count);
11 } Errors/Warnings
12
13 There are no errors in the candidate's code.

Structural Vulnerabilites and Errors

There are no errors in the candidate's code.

Test Case Execution Passed TC: 37.5%

Total score
33% 50% 0%
3/8 Basic(2/6) Advance(1/2) Edge(0/0)

Compilation Statistics

9 4 5 4 0 0

Total attempts Successful Compilation errors Sample failed Timed out Runtime errors

Response time: 00:05:55

Average time taken between two compile attempts: 00:00:39

Average test case pass percentage per compile: 4.2%

© 2025 SHL and/or its affiliates. All rights reserved.. 11/24


Average-case Time Complexity

Average Case Time Complexity is the order of performance of the algorithm given a random set of inputs. This complexity is measured
here using the Big-O asymptotic notation. This is the complexity detected by empirically fitting a curve to the run-time for different input
sizes to the given code. It has been benchmarked across problems.

Test Case Execution

There are three types of test-cases for every coding problem:

Basic: The basic test-cases demonstrate the primary logic of the problem. They include the most common and obvious cases that an
average candidate would consider while coding. They do not include those cases that need extra checks to be placed in the logic.

Advanced: The advanced test-cases contain pathological input conditions that would attempt to break the codes which have
incorrect/semi-correct implementations of the correct logic or incorrect/semi-correct formulation of the logic.

Edge: The edge test-cases specifically confirm whether the code runs successfully even under extreme conditions of the domain of
inputs and that all possible cases are covered by the code

Question 2 (Language: C++)

The function/method arrayReverse modify the input list by reversing its element
The function/method arrayReverse accepts two arguments - len, an integer representing the length of the
list and arr, list of integers representing the input list, respectively.

For example, if the input list arr is {20 30 10 40 50}, the function/method is supposed to print {50 40 10 30 20}.

The function/method arrayReverse compiles successfully but fails to get the desired result for some test cases due to
logical errors. Your task is to fix the code so that it passes all the test cases.

Scores

Final Code Submitted Compilation Status: Pass Code Analysis

1 #include <bits/stdc++.h> Average-case Time Complexity


2 using namespace std;
3 void arrayReverse(int len, int arr[])
4{ Candidate code: Complexity is reported only when the code
is correct and it passes all the basic and advanced test
5 reverse(arr , arr + len); cases.
6}
Best case code:

*N represents

Errors/Warnings

© 2025 SHL and/or its affiliates. All rights reserved.. 12/24


There are no errors in the candidate's code.

Structural Vulnerabilites and Errors

There are no errors in the candidate's code.

Test Case Execution Passed TC: 100%

Total score
100% 100% 0%
8/8 Basic(6/6) Advance(2/2) Edge(0/0)

Compilation Statistics

3 3 0 0 0 0

Total attempts Successful Compilation errors Sample failed Timed out Runtime errors

Response time: 00:01:55

Average time taken between two compile attempts: 00:00:38

Average test case pass percentage per compile: 100%

Average-case Time Complexity

Average Case Time Complexity is the order of performance of the algorithm given a random set of inputs. This complexity is measured
here using the Big-O asymptotic notation. This is the complexity detected by empirically fitting a curve to the run-time for different input
sizes to the given code. It has been benchmarked across problems.

Test Case Execution

There are three types of test-cases for every coding problem:

Basic: The basic test-cases demonstrate the primary logic of the problem. They include the most common and obvious cases that an
average candidate would consider while coding. They do not include those cases that need extra checks to be placed in the logic.

Advanced: The advanced test-cases contain pathological input conditions that would attempt to break the codes which have
incorrect/semi-correct implementations of the correct logic or incorrect/semi-correct formulation of the logic.

Edge: The edge test-cases specifically confirm whether the code runs successfully even under extreme conditions of the domain of
inputs and that all possible cases are covered by the code

Question 3 (Language: C++)

The function/method printCharacterPattern accepts an integer num. It is supposed to print the first num (0 ≤ num ≤
26 ) lines of the pattern as shown below.

© 2025 SHL and/or its affiliates. All rights reserved.. 13/24


) p

For example, if num = 4, the pattern is:


a
ab
abc
abcd

The function/method compiles successfully but fails to print the desired result for some test cases due to logical errors.
Your task is to fix the code so that it passes all the test cases.

Scores

Final Code Submitted Compilation Status: Pass Code Analysis

1 #include <iostream> Average-case Time Complexity


2 using namespace std;
3
4 void printCharacterPattern(int num) { Candidate code: Complexity is reported only when the code
is correct and it passes all the basic and advanced test
5 for (int i = 0; i < num; ++i) { cases.
6 for (int j = 0; j <= i; ++j) {
7 cout << (char)('a' + j); Best case code:

8 }
9 cout << endl; *N represents

10 }
11 } Errors/Warnings
12 There are no errors in the candidate's code.

Structural Vulnerabilites and Errors

There are no errors in the candidate's code.

Test Case Execution Passed TC: 100%

Total score
100% 100% 100%
8/8 Basic(3/3) Advance(4/4) Edge(1/1)

© 2025 SHL and/or its affiliates. All rights reserved.. 14/24


Compilation Statistics

6 6 0 2 0 0

Total attempts Successful Compilation errors Sample failed Timed out Runtime errors

Response time: 00:02:31

Average time taken between two compile attempts: 00:00:25

Average test case pass percentage per compile: 70.8%

Average-case Time Complexity

Average Case Time Complexity is the order of performance of the algorithm given a random set of inputs. This complexity is measured
here using the Big-O asymptotic notation. This is the complexity detected by empirically fitting a curve to the run-time for different input
sizes to the given code. It has been benchmarked across problems.

Test Case Execution

There are three types of test-cases for every coding problem:

Basic: The basic test-cases demonstrate the primary logic of the problem. They include the most common and obvious cases that an
average candidate would consider while coding. They do not include those cases that need extra checks to be placed in the logic.

Advanced: The advanced test-cases contain pathological input conditions that would attempt to break the codes which have
incorrect/semi-correct implementations of the correct logic or incorrect/semi-correct formulation of the logic.

Edge: The edge test-cases specifically confirm whether the code runs successfully even under extreme conditions of the domain of
inputs and that all possible cases are covered by the code

Question 4 (Language: C++)

The function/method findMaxElement return an integer representing the largest element in the given two input lists.
The function/method findMaxElement accepts four arguments - len1, an integer representing the length of the first
list, arr1, a list of integers representing the first input list, len2, an integer representing the length of the second input
list and arr2, a list of integers representing the second input list, respectively.

Another function/method sortArray accepts two arguments - len, an integer representing the length of the list and arr,
a list of integers, respectively and return a list sorted ascending order.

Your task is to use the function/method sortArray to complete the code in findMaxElement so that it passes all the test
cases.

© 2025 SHL and/or its affiliates. All rights reserved.. 15/24


Scores

Final Code Submitted Compilation Status: Pass Code Analysis

1 #include <bits/stdc++.h> Average-case Time Complexity


2 using namespace std;
3 int* sortArray(int len, int* arr)
4{ Candidate code: Complexity is reported only when the code
is correct and it passes all the basic and advanced test
5 int i=0,j=0,temp=0; cases.
6 for(i=0;i<len;i++)
7 { Best case code:

8 for(j=i+1;j<len;j++)
9 { *N represents

10 if(arr[i]>arr[j])
11 { Errors/Warnings
12 temp = arr[i];
13 arr[i] = arr[j]; There are no errors in the candidate's code.

14 arr[j] = temp;
15 } Structural Vulnerabilites and Errors

16 } There are no errors in the candidate's code.


17 }
18 return arr;
19 }
20
21 int findMaxElement(int len1, int arr1[], int len2, int arr2[])
22 {
23 // write your code here
24 sort(arr1 , arr1 + len1) ;
25 sort(arr2 , arr2 + len2) ;
26
27 int maxi = max(arr1[len1-1] , arr2[len2 - 1]);
28
29 return maxi ;
30
31 }
32
Test Case Execution Passed TC: 100%

Total score
100% 100% 0%
8/8 Basic(2/2) Advance(6/6) Edge(0/0)

© 2025 SHL and/or its affiliates. All rights reserved.. 16/24


Compilation Statistics

2 2 0 0 0 0

Total attempts Successful Compilation errors Sample failed Timed out Runtime errors

Response time: 00:04:11

Average time taken between two compile attempts: 00:02:06

Average test case pass percentage per compile: 100%

Average-case Time Complexity

Average Case Time Complexity is the order of performance of the algorithm given a random set of inputs. This complexity is measured
here using the Big-O asymptotic notation. This is the complexity detected by empirically fitting a curve to the run-time for different input
sizes to the given code. It has been benchmarked across problems.

Test Case Execution

There are three types of test-cases for every coding problem:

Basic: The basic test-cases demonstrate the primary logic of the problem. They include the most common and obvious cases that an
average candidate would consider while coding. They do not include those cases that need extra checks to be placed in the logic.

Advanced: The advanced test-cases contain pathological input conditions that would attempt to break the codes which have
incorrect/semi-correct implementations of the correct logic or incorrect/semi-correct formulation of the logic.

Edge: The edge test-cases specifically confirm whether the code runs successfully even under extreme conditions of the domain of
inputs and that all possible cases are covered by the code

Question 5 (Language: C++)

You are given predefined structure Time containing hour, minute, and second as members. A collection of
functions/methods for performing some common operations on times is also available. You must make use of these
functions/methods to calculate and return the difference.

The function/method difference_in_times accepts two arguments - time1, and time2, representing two times and is
supposed to return an integer representing the difference in the number of seconds.

You must complete the code so that it passes all the test cases.

Helper Description

© 2025 SHL and/or its affiliates. All rights reserved.. 17/24


The following class is used to represent the time and is already implemented in the default code (Do not write this
definition again in your code):

class Time

int hour;

int minute;

int second;

int Time :: Time_compareTo( Time* time2)

/*Return 1, if time1 is greater than time2.

Return -1 if time1 is less than time2

or, Return 0, if time1 is equal to time2

This can be called as -

* If time1 and time2 are two Time then -

* time1.compareTo(time2) */

void Time :: Time_addSecond()

/* Add one second in the time;

This can be called as -

* If time1 is Time then -

* time1.addSecond() */

Scores

Final Code Submitted Compilation Status: Fail Code Analysis

1 #include <bits/stdc++.h> Average-case Time Complexity


2 using namespace std;
3 int difference_in_times(Time *time1, Time *time2)
4{ Candidate code: Complexity is reported only when the code
is correct and it passes all the basic and advanced test
5 // write your code here cases.

© 2025 SHL and/or its affiliates. All rights reserved.. 18/24


6}
7 Best case code:

*N represents

Errors/Warnings

In file included from main_24.cpp:8:


source_24.cpp: In function 'int
difference_in_times(Time*, Time*)':
source_24.cpp:6:1: error: no return statement in
function returning non-void [-Werror=return-type]
}
^
cc1plus: some warnings being treated as errors

Structural Vulnerabilites and Errors

There are no errors in the candidate's code.

Compilation Statistics

0 0 0 0 0 0

Total attempts Successful Compilation errors Sample failed Timed out Runtime errors

Response time: 00:00:48

Average time taken between two compile attempts: 00:00:00

Average test case pass percentage per compile: 0%

© 2025 SHL and/or its affiliates. All rights reserved.. 19/24


Average-case Time Complexity

Average Case Time Complexity is the order of performance of the algorithm given a random set of inputs. This complexity is measured
here using the Big-O asymptotic notation. This is the complexity detected by empirically fitting a curve to the run-time for different input
sizes to the given code. It has been benchmarked across problems.

Test Case Execution

There are three types of test-cases for every coding problem:

Basic: The basic test-cases demonstrate the primary logic of the problem. They include the most common and obvious cases that an
average candidate would consider while coding. They do not include those cases that need extra checks to be placed in the logic.

Advanced: The advanced test-cases contain pathological input conditions that would attempt to break the codes which have
incorrect/semi-correct implementations of the correct logic or incorrect/semi-correct formulation of the logic.

Edge: The edge test-cases specifically confirm whether the code runs successfully even under extreme conditions of the domain of
inputs and that all possible cases are covered by the code

Question 6 (Language: C++)

The function/method removeElement prints space separated integers that remains after removing the integer at the
given index from the input list.

The function/method removeElement accepts three arguments - size, an integer representing the size of the input list,
indexValue, an integer representing given index and inputList, a list of integers representing the input list.

The function/method removeElement compiles successfully but fails to print the desired result for some test cases due
to incorrect implementation of the function/method removeElement. Your task is to fix the code so that it passes all
the test cases.

Note:
Zero-based indexing is followed to access list elements.

Scores

Final Code Submitted Compilation Status: Pass Code Analysis

1 #include <iostream> Average-case Time Complexity


2 using namespace std;
3
4 void removeElement(int size, int index, int *arr) { Candidate code: Complexity is reported only when the code
is correct and it passes all the basic and advanced test
5 if (index < size) { cases.
6 for (int i = index; i < size - 1; ++i) {
7 arr[i] = arr[i + 1]; Best case code:

8 }
9 for (int i = 0; i < size - 1; ++i) { *N represents

© 2025 SHL and/or its affiliates. All rights reserved.. 20/24


10 cout << arr[i] << " ";
11 } Errors/Warnings

12 } else {
13 for (int i = 0; i < size; ++i) {
There are no errors in the candidate's code.

14 cout << arr[i] << " ";


Structural Vulnerabilites and Errors
15 }
16 } There are no errors in the candidate's code.
17 }
18
Test Case Execution Passed TC: 100%

Total score
100% 100% 100%
8/8 Basic(5/5) Advance(2/2) Edge(1/1)

Compilation Statistics

2 2 0 0 0 0

Total attempts Successful Compilation errors Sample failed Timed out Runtime errors

Response time: 00:01:31

Average time taken between two compile attempts: 00:00:46

Average test case pass percentage per compile: 100%

Average-case Time Complexity

Average Case Time Complexity is the order of performance of the algorithm given a random set of inputs. This complexity is measured
here using the Big-O asymptotic notation. This is the complexity detected by empirically fitting a curve to the run-time for different input
sizes to the given code. It has been benchmarked across problems.

Test Case Execution

There are three types of test-cases for every coding problem:

Basic: The basic test-cases demonstrate the primary logic of the problem. They include the most common and obvious cases that an
average candidate would consider while coding. They do not include those cases that need extra checks to be placed in the logic.

Advanced: The advanced test-cases contain pathological input conditions that would attempt to break the codes which have
incorrect/semi-correct implementations of the correct logic or incorrect/semi-correct formulation of the logic.

Edge: The edge test-cases specifically confirm whether the code runs successfully even under extreme conditions of the domain of
inputs and that all possible cases are covered by the code

© 2025 SHL and/or its affiliates. All rights reserved.. 21/24


Question 7 (Language: C++)

The function/method countElement returns the number of elements in the input list arr which are greater than twice
the input number K. The function/method countElement accepts three arguments - size, an integer representing the
size of the input list, numK, an integer representing the input number K and inputList, a list of integers.

The function/method compiles unsuccessfully due to syntactical error. Your task is to fix the code so that it passes all
the test cases.

Scores

Final Code Submitted Compilation Status: Pass Code Analysis

1 #include <iostream> Average-case Time Complexity


2
3 int countElement(int size, int numK, int inputList[]) {
4 int count = 0; Candidate code: Complexity is reported only when the code
is correct and it passes all the basic and advanced test
5 for (int i = 0; i < size; i++) { cases.
6 if (inputList[i] > 2 * numK) {
7 count++; Best case code:

8 }
9 } *N represents

10 return count;
11 } Errors/Warnings

There are no errors in the candidate's code.

Structural Vulnerabilites and Errors

There are no errors in the candidate's code.

Test Case Execution Passed TC: 100%

Total score
100% 100% 100%
10/10 Basic(6/6) Advance(3/3) Edge(1/1)

© 2025 SHL and/or its affiliates. All rights reserved.. 22/24


Compilation Statistics

2 2 0 0 0 0

Total attempts Successful Compilation errors Sample failed Timed out Runtime errors

Response time: 00:02:08

Average time taken between two compile attempts: 00:01:04

Average test case pass percentage per compile: 100%

Average-case Time Complexity

Average Case Time Complexity is the order of performance of the algorithm given a random set of inputs. This complexity is measured
here using the Big-O asymptotic notation. This is the complexity detected by empirically fitting a curve to the run-time for different input
sizes to the given code. It has been benchmarked across problems.

Test Case Execution

There are three types of test-cases for every coding problem:

Basic: The basic test-cases demonstrate the primary logic of the problem. They include the most common and obvious cases that an
average candidate would consider while coding. They do not include those cases that need extra checks to be placed in the logic.

Advanced: The advanced test-cases contain pathological input conditions that would attempt to break the codes which have
incorrect/semi-correct implementations of the correct logic or incorrect/semi-correct formulation of the logic.

Edge: The edge test-cases specifically confirm whether the code runs successfully even under extreme conditions of the domain of
inputs and that all possible cases are covered by the code

© 2025 SHL and/or its affiliates. All rights reserved.. 23/24


4 Learning Resources

The resources are not available for any of the tests taken by the candidate.

© 2025 SHL and/or its affiliates. All rights reserved.. 24/24

You might also like